name: Style Check

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build:
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-latest]
        node-version: [18.x]

    runs-on: ${{ matrix.os }}

    steps:
      - uses: actions/checkout@v5
      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v5
        with:
          node-version: ${{ matrix.node-version }}
      - run: npm ci
      - name: Run headless test
        uses: GabrielBB/xvfb-action@v1
        with:
          working-directory: ./ #optional
          run: npm run lint
