Fix errors #32
This file contains 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: Run JS tests | |
on: | |
- push | |
- pull_request | |
jobs: | |
node: | |
name: Node v${{ matrix.node }} | |
runs-on: ubuntu-24.04-arm | |
env: | |
MSHOULD_FAST: 1 | |
strategy: | |
matrix: # LTS on Jan 2025. Hardcoded is more secure | |
node: [20.18.1, 22.13.0] | |
steps: | |
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4 | |
with: | |
submodules: ${{ inputs.clone-submodules || false }} | |
- name: Use Node.js ${{ matrix.node }} | |
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4 | |
with: | |
registry-url: "https://registry.npmjs.org" | |
cache: npm | |
node-version: ${{ matrix.node }} | |
- run: npm install | |
- run: npm run build --if-present | |
- run: npm test | |
coverage: | |
name: Measure coverage | |
runs-on: ubuntu-24.04-arm | |
steps: | |
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4 | |
with: | |
submodules: ${{ inputs.clone-submodules || false }} | |
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4 | |
with: | |
registry-url: "https://registry.npmjs.org" | |
cache: npm | |
- run: npm install | |
- run: npm run build --if-present | |
- run: npm install --no-save c8@10.1.2 | |
- run: npx c8 npm test |