ci: pin coverage Python/gcovr and align lockfile docs #23
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: ci | |
| on: | |
| push: | |
| pull_request: | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # windows-2022 ships VS 2022. windows-latest currently has VS 2026 | |
| # (18.x), which node-gyp 10/11 bundled with Node 22 reports as | |
| # unknown version "undefined" and then fails the native rebuild. | |
| os: [ubuntu-latest, macos-latest, windows-2022] | |
| node: [22] | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| - name: Install and test | |
| # bash so `&&` is a hard stop on Windows too (PowerShell would still | |
| # run npm test after a failed rebuild). | |
| shell: bash | |
| run: npm ci && npm test | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
| with: | |
| node-version: 22 | |
| - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: '3.12' | |
| - name: Install gcovr | |
| run: pip install gcovr==8.6 | |
| - name: Install dependencies | |
| run: npm ci | |
| # Fails the job when JS or native coverage drops below 95%. | |
| - name: Coverage | |
| run: npm run coverage |