name: Tests on: [push, pull_request] env: CI: true jobs: test: name: Node ${{ matrix.node }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: node: [20, 22, 24, 25] os: [ubuntu-latest, windows-latest] steps: - name: Clone repository uses: actions/checkout@v4 - name: Set Node.js version uses: actions/setup-node@v4 with: node-version: ${{ matrix.node }} - name: Install npm dependencies run: npm ci - name: Run lint run: npm run lint - name: Run tests run: npm run test-cov - name: Coveralls if: github.event.pull_request.head.repo.fork == false || github.event_name == 'push' run: cat ./coverage/lcov.info | node ./bin/coveralls.js env: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} COVERALLS_SERVICE_NAME: CI-pipeline COVERALLS_SERVICE_JOB_ID: ${{github.run_id}} COVERALLS_SERVICE_JOB_NUMBER: ${{github.run_number}} COVERALLS_FLAG_NAME: ${{matrix.os}}-node-${{ matrix.node }} COVERALLS_PARALLEL: true NODE_COVERALLS_DEBUG: 1 finish: needs: test if: github.event.pull_request.head.repo.fork == false || github.event_name == 'push' runs-on: ubuntu-latest steps: - name: Clone repository uses: actions/checkout@v4 - name: Coveralls Finished run: | curl -kv -d 'payload[build_num]=${{github.run_id}}&payload[status]=done' https://coveralls.io/webhook?repo_token=${COVERALLS_REPO_TOKEN} env: COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}