| 1 | name: Tests |
| 2 | |
| 3 | on: |
| 4 | - push |
| 5 | |
| 6 | permissions: |
| 7 | contents: read |
| 8 | |
| 9 | jobs: |
| 10 | build: |
| 11 | runs-on: ubuntu-latest |
| 12 | |
| 13 | strategy: |
| 14 | matrix: |
| 15 | node-version: |
| 16 | - 20 |
| 17 | - 22 |
| 18 | |
| 19 | steps: |
| 20 | - uses: actions/checkout@v4 |
| 21 | |
| 22 | - name: Use Node.js ${{ matrix.node-version }} |
| 23 | uses: actions/setup-node@v4 |
| 24 | with: |
| 25 | node-version: ${{ matrix.node-version }} |
| 26 | |
| 27 | - run: npm install |
| 28 | - run: npm run build --if-present |
| 29 | - run: npm test |
| 30 | env: |
| 31 | CI: true |
| 32 |