選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

97 行
2.6KB

  1. name: Package usage
  2. on: [push, pull_request]
  3. jobs:
  4. package:
  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. - name: Create package tarball
  13. run: |
  14. export ARCHIVE_FILENAME=$(npm pack | tail -n 1)
  15. mv $ARCHIVE_FILENAME mustache.tgz
  16. - name: Store package tarball for later
  17. uses: actions/upload-artifact@v2
  18. with:
  19. name: package-output
  20. path: mustache.tgz
  21. common-js-usage:
  22. runs-on: ubuntu-latest
  23. needs: package
  24. steps:
  25. - uses: actions/checkout@v1
  26. - name: Setup Node.js
  27. uses: actions/setup-node@v1
  28. with:
  29. node-version: 12.x
  30. - name: Get package tarball from package step
  31. uses: actions/download-artifact@v2
  32. with:
  33. name: package-output
  34. - name: Package, install and test
  35. run: |
  36. export UNPACK_DESTINATION=$(mktemp -d)
  37. mv mustache.tgz $UNPACK_DESTINATION
  38. cp test/module-systems/commonjs-test.js $UNPACK_DESTINATION
  39. cd $UNPACK_DESTINATION
  40. npm install mustache.tgz
  41. node commonjs-test.js
  42. esm-usage:
  43. runs-on: ubuntu-latest
  44. needs: package
  45. steps:
  46. - uses: actions/checkout@v1
  47. - name: Setup Node.js
  48. uses: actions/setup-node@v1
  49. with:
  50. node-version: '>=13.2.0'
  51. - name: Get package tarball from package step
  52. uses: actions/download-artifact@v2
  53. with:
  54. name: package-output
  55. - name: Package, install and test
  56. run: |
  57. export UNPACK_DESTINATION=$(mktemp -d)
  58. mv mustache.tgz $UNPACK_DESTINATION
  59. cp test/module-systems/esm-test.mjs $UNPACK_DESTINATION
  60. cp test/module-systems/esm-test-exports.mjs $UNPACK_DESTINATION
  61. cd $UNPACK_DESTINATION
  62. npm install mustache.tgz
  63. node esm-test.mjs
  64. node esm-test-exports.mjs
  65. browser-usage:
  66. runs-on: ubuntu-latest
  67. steps:
  68. - uses: actions/checkout@v1
  69. - name: Setup Node.js
  70. uses: actions/setup-node@v1
  71. with:
  72. node-version: 12.x
  73. - name: Install and test
  74. run: |
  75. npm ci
  76. npx mocha test/module-systems/browser-test.js
  77. deno-usage:
  78. runs-on: ubuntu-latest
  79. steps:
  80. - uses: actions/checkout@v1
  81. - uses: denolib/setup-deno@master
  82. with:
  83. deno-version: 'v1.0.0'
  84. - run: deno --version
  85. - run: deno test --allow-net=deno.land test/module-systems/deno-test.ts