node-tests.yml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. name: Node
  2. on:
  3. pull_request:
  4. push:
  5. branches:
  6. - master
  7. - stable*
  8. jobs:
  9. versions:
  10. runs-on: ubuntu-latest
  11. outputs:
  12. nodeVersion: ${{ steps.versions.outputs.nodeVersion }}
  13. npmVersion: ${{ steps.versions.outputs.npmVersion }}
  14. steps:
  15. - name: Checkout
  16. uses: actions/checkout@v2
  17. - name: Read package.json node and npm engines version
  18. uses: skjnldsv/read-package-engines-version-actions@v1.1
  19. id: versions
  20. with:
  21. fallbackNode: '^12'
  22. fallbackNpm: '^6'
  23. test:
  24. runs-on: ubuntu-latest
  25. needs: versions
  26. steps:
  27. - name: Checkout
  28. uses: actions/checkout@v2
  29. - name: Set up node ${{ needs.versions.outputs.nodeVersion }}
  30. uses: actions/setup-node@v2
  31. with:
  32. node-version: ${{ needs.versions.outputs.nodeVersion }}
  33. - name: Set up npm ${{ needs.versions.outputs.npmVersion }}
  34. run: npm i -g npm@"${{ needs.versions.outputs.npmVersion }}"
  35. - name: Install dependencies
  36. run: npm ci
  37. - name: Test
  38. run: npm run test
  39. jsunit:
  40. runs-on: ubuntu-latest
  41. needs: versions
  42. steps:
  43. - name: Checkout
  44. uses: actions/checkout@v2
  45. - name: Set up node ${{ needs.versions.outputs.nodeVersion }}
  46. uses: actions/setup-node@v2
  47. with:
  48. node-version: ${{ needs.versions.outputs.nodeVersion }}
  49. - name: Set up npm ${{ needs.versions.outputs.npmVersion }}
  50. run: npm i -g npm@"${{ needs.versions.outputs.npmVersion }}"
  51. - name: Install dependencies
  52. run: npm ci
  53. - name: Test
  54. run: ./autotest-js.sh
  55. handlebars:
  56. runs-on: ubuntu-latest
  57. needs: versions
  58. steps:
  59. - name: Checkout
  60. uses: actions/checkout@v2
  61. - name: Set up node ${{ needs.versions.outputs.nodeVersion }}
  62. uses: actions/setup-node@v2
  63. with:
  64. node-version: ${{ needs.versions.outputs.nodeVersion }}
  65. - name: Set up npm ${{ needs.versions.outputs.npmVersion }}
  66. run: npm i -g npm@"${{ needs.versions.outputs.npmVersion }}"
  67. - name: Install dependencies
  68. run: npm ci
  69. - name: Run compile
  70. run: ./build/compile-handlebars-templates.sh