diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..b19ef09 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,28 @@ +name: Lint + +on: + push: + branches: [master] + pull_request: + branches: [master] + +jobs: + lint: + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [20.x, 22.x] + steps: + - uses: actions/checkout@v4 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: Install dependencies + run: npm ci + + - name: Lint + run: | + npm run lint + npm run format -- --check diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3261eb3..bd90648 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - node-version: [20.x] + node-version: [20.x, 22.x] steps: - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} @@ -25,11 +25,6 @@ jobs: sudo apt-get install -y libgbm-dev jq xvfb npm ci - - name: Lint - run: | - npm run lint - npm run format -- --check - - name: Install Chrome uses: browser-actions/setup-chrome@latest with: @@ -70,7 +65,7 @@ jobs: - name: Upload coverage report uses: actions/upload-artifact@v4 with: - name: coverage-report + name: coverage-report-${{ matrix.node-version }} path: coverage/ - name: Run visual tests @@ -111,5 +106,5 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: screenshots + name: screenshots-${{ matrix.node-version }} path: artifacts/