nodejs.yml 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
  2. # For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
  3. name: Node.js CI
  4. on:
  5. push:
  6. branches: [main]
  7. pull_request:
  8. branches: [main]
  9. jobs:
  10. build:
  11. runs-on: ubuntu-latest
  12. strategy:
  13. matrix:
  14. node-version:
  15. [
  16. "10.0",
  17. "10.19",
  18. "12.4",
  19. "12.8",
  20. "13.11",
  21. "14.3",
  22. "14",
  23. "15",
  24. "16.10",
  25. "16.11",
  26. "17",
  27. "18.19",
  28. "18.20",
  29. "19",
  30. "20.9",
  31. "20.10",
  32. "21",
  33. "22",
  34. ]
  35. steps:
  36. - uses: actions/checkout@v2
  37. - name: Use Node.js latest
  38. uses: actions/setup-node@v1
  39. - run: npm install
  40. - name: Use Node.js ${{ matrix.node-version }}
  41. uses: actions/setup-node@v1
  42. with:
  43. node-version: ${{ matrix.node-version }}
  44. - run: npm test