verify.yml 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. name: Verify changes
  2. on: [push, pull_request]
  3. jobs:
  4. lint:
  5. runs-on: ubuntu-latest
  6. steps:
  7. - uses: actions/checkout@v2
  8. - name: Setup Node.js
  9. uses: actions/setup-node@v1
  10. with:
  11. node-version: 14.x
  12. - run: npm install
  13. - run: npm run test-lint
  14. tests:
  15. runs-on: ubuntu-latest
  16. strategy:
  17. matrix:
  18. node-version: [10.x, 12.x, 14.x, 15.x]
  19. steps:
  20. - uses: actions/checkout@v2
  21. with:
  22. submodules: recursive
  23. - name: Setup Node.js
  24. uses: actions/setup-node@v1
  25. with:
  26. node-version: ${{ matrix.node-version }}
  27. - name: npm install and test
  28. run: |
  29. npm install
  30. npm run test-unit
  31. build:
  32. runs-on: ubuntu-latest
  33. steps:
  34. - uses: actions/checkout@v2
  35. - name: Setup Node.js
  36. uses: actions/setup-node@v1
  37. with:
  38. node-version: 14.x
  39. - name: npm install and build
  40. run: |
  41. npm install
  42. npm run build
  43. - name: Store build-output for later
  44. uses: actions/upload-artifact@v2
  45. with:
  46. name: build-output
  47. path: |
  48. mustache.js
  49. mustache.mjs
  50. tests-on-legacy:
  51. runs-on: ubuntu-latest
  52. strategy:
  53. matrix:
  54. node-version: [0.10.x, 0.12.x, 4.x, 6.x, 8.x]
  55. needs: build
  56. steps:
  57. - uses: actions/checkout@v2
  58. with:
  59. submodules: recursive
  60. - name: Setup Node.js
  61. uses: actions/setup-node@v1
  62. with:
  63. node-version: ${{ matrix.node-version }}
  64. - name: Get build-output from build step
  65. uses: actions/download-artifact@v2
  66. with:
  67. name: build-output
  68. - name: npm install and test
  69. run: |
  70. npm install mocha@3 chai@3
  71. npm run test-unit