Chore: Updates to modern npm and more... #215
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: | |
| branches: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| node-version: [22.x, 24.x] | |
| steps: | |
| # Checkout | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Use node_modules cache | |
| id: node-modules-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: node_modules | |
| key: node-modules-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('./package-lock.json') }} | |
| restore-keys: | | |
| node-modules-${{ runner.os }}-${{ matrix.node-version }}- | |
| node-modules-${{ runner.os }}- | |
| - name: Project installation | |
| if: steps.node-modules-cache.outputs.cache-hit != 'true' | |
| run: npm ci | |
| env: | |
| CI: true | |
| - name: Checks (lint, unit tests) | |
| run: npm run check | |
| # Caching: test scenarios | |
| # **Note**: _don't_ use permissive restore-keys because we skip installs | |
| # all together. | |
| - name: Use test/packages node_modules cache | |
| id: test-packages-cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| test/packages/*/node_modules | |
| key: test-packages-${{ runner.os }}-${{ matrix.node-version }}-${{ hashFiles('test/packages/*/package-lock.json') }} | |
| - name: Install test fixtures | |
| run: npm run test:install | |
| - name: CLI tests | |
| run: npm run test:cli |