.github/workflows/unit-tests.yml
raw| 1 | name: Unit tests |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: [main, master, next] |
| 6 | pull_request: |
| 7 | |
| 8 | jobs: |
| 9 | run-tests: |
| 10 | name: Run unit tests |
| 11 | runs-on: ubuntu-latest |
| 12 | timeout-minutes: 5 |
| 13 | |
| 14 | steps: |
| 15 | - name: Check out repo |
| 16 | uses: actions/checkout@v5 |
| 17 | |
| 18 | - name: Set up node |
| 19 | uses: actions/setup-node@v5 |
| 20 | with: |
| 21 | node-version: 20 |
| 22 | cache: 'npm' |
| 23 | |
| 24 | - name: Install dependencies |
| 25 | run: npm ci |
| 26 | |
| 27 | - name: Bundle library |
| 28 | run: npm run build |
| 29 | |
| 30 | - name: Run tests |
| 31 | run: npm run test:unit |