nodejs.yml 605 B

123456789101112131415161718192021222324252627282930313233
  1. name: Node CI
  2. on:
  3. push:
  4. branches:
  5. - main
  6. - next
  7. pull_request:
  8. branches:
  9. - main
  10. - next
  11. jobs:
  12. build:
  13. runs-on: ubuntu-latest
  14. strategy:
  15. matrix:
  16. node-version: [12.x, 14.x, 16.x, 18.x]
  17. steps:
  18. - uses: actions/checkout@v1
  19. - name: Use Node.js ${{ matrix.node-version }}
  20. uses: actions/setup-node@v1
  21. with:
  22. node-version: ${{ matrix.node-version }}
  23. - name: npm install, build, and test
  24. run: |
  25. npm ci
  26. npm run build --if-present
  27. npm test
  28. env:
  29. CI: true