run-npm-tests.yml 547 B

12345678910111213141516171819202122232425262728293031
  1. name: Run npm Tests
  2. on:
  3. workflow_dispatch:
  4. push:
  5. branches: [ "main" ]
  6. pull_request:
  7. branches: [ "main" ]
  8. jobs:
  9. test:
  10. runs-on: ubuntu-latest
  11. strategy:
  12. matrix:
  13. node-version: [22, 23]
  14. steps:
  15. - name: Checkout repository
  16. uses: actions/checkout@v2
  17. - name: Set up Node.js ${{ matrix.node-version }}
  18. uses: actions/setup-node@v3
  19. with:
  20. node-version: ${{ matrix.node-version }}
  21. - name: Install dependencies
  22. run: npm install
  23. - name: Run tests
  24. run: npm test