ci.yaml 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. name: CI
  2. on:
  3. push:
  4. branches: [ v9 ]
  5. pull_request:
  6. branches: [ v9 ]
  7. jobs:
  8. build:
  9. name: Test
  10. runs-on: ${{ matrix.os }}
  11. strategy:
  12. fail-fast: false
  13. matrix:
  14. os:
  15. - ubuntu-latest
  16. - macos-latest
  17. - windows-latest
  18. node_version:
  19. - 8
  20. - 10
  21. - 12
  22. - 14
  23. - 16
  24. - 17
  25. steps:
  26. - uses: actions/checkout@v2
  27. - name: Use Node.js ${{ matrix.node-version }}
  28. uses: actions/setup-node@v1
  29. with:
  30. node-version: ${{ matrix.node-version }}
  31. - name: Install Dependencies
  32. run: npm ci --ignore-scripts
  33. - name: Run Tests
  34. if: matrix.os != 'windows-latest'
  35. run: npm test --ignore-scripts
  36. - name: Run Tests (Windows)
  37. if: matrix.os == 'windows-latest'
  38. run: npm run-script test-windows --ignore-scripts
  39. code-lint:
  40. name: Code Lint
  41. runs-on: ubuntu-latest
  42. steps:
  43. - uses: actions/checkout@v2
  44. - name: Use Node.js 16
  45. uses: actions/setup-node@v1
  46. with:
  47. node-version: 16 # LTS
  48. - name: Install Dependencies
  49. run: npm ci --ignore-scripts
  50. - name: Lockfile Lint
  51. run: |
  52. npm exec \
  53. --no-install \
  54. --package=lockfile-lint \
  55. -- \
  56. lockfile-lint \
  57. --allowed-hosts=npm \
  58. --path=./package-lock.json \
  59. --validate-https \
  60. --validate-package-names