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

119 行
2.9KB

  1. name: Verify changes
  2. on: [push, pull_request]
  3. jobs:
  4. tests:
  5. runs-on: ubuntu-latest
  6. strategy:
  7. matrix:
  8. node-version: [8.x, 10.x, 12.x, 14.x, 15.x]
  9. steps:
  10. - uses: actions/checkout@v1
  11. - name: Setup Node.js
  12. uses: actions/setup-node@v1
  13. with:
  14. node-version: ${{ matrix.node-version }}
  15. - name: npm install and test
  16. run: |
  17. npm install
  18. npm test
  19. tests-on-legacy:
  20. runs-on: ubuntu-latest
  21. strategy:
  22. matrix:
  23. node-version: [0.10.x, 0.12.x, 4.x, 6.x]
  24. steps:
  25. - uses: actions/checkout@v1
  26. - name: Setup Node.js
  27. uses: actions/setup-node@v1
  28. with:
  29. node-version: ${{ matrix.node-version }}
  30. - name: npm install and test
  31. run: |
  32. npm install mocha@3 chai@3
  33. npm run test-unit
  34. common-js-usage:
  35. runs-on: ubuntu-latest
  36. steps:
  37. - uses: actions/checkout@v1
  38. - name: Setup Node.js
  39. uses: actions/setup-node@v1
  40. with:
  41. node-version: 12.x
  42. - name: Package, install and test
  43. run: |
  44. export ARCHIVE_FILENAME=$(npm pack | tail -n 1)
  45. export UNPACK_DESTINATION=$(mktemp -d)
  46. mv $ARCHIVE_FILENAME $UNPACK_DESTINATION
  47. cp test/module-systems/commonjs-test.js $UNPACK_DESTINATION
  48. cd $UNPACK_DESTINATION
  49. npm install $ARCHIVE_FILENAME
  50. node commonjs-test.js
  51. esm-usage:
  52. runs-on: ubuntu-latest
  53. steps:
  54. - uses: actions/checkout@v1
  55. - name: Setup Node.js
  56. uses: actions/setup-node@v1
  57. with:
  58. node-version: '>=13.2.0'
  59. - name: Package, install and test
  60. run: |
  61. export ARCHIVE_FILENAME=$(npm pack | tail -n 1)
  62. export UNPACK_DESTINATION=$(mktemp -d)
  63. mv $ARCHIVE_FILENAME $UNPACK_DESTINATION
  64. cp test/module-systems/esm-test.mjs $UNPACK_DESTINATION
  65. cd $UNPACK_DESTINATION
  66. npm install $ARCHIVE_FILENAME
  67. node esm-test.mjs
  68. browser-usage:
  69. runs-on: ubuntu-latest
  70. steps:
  71. - uses: actions/checkout@v1
  72. - name: Setup Node.js
  73. uses: actions/setup-node@v1
  74. with:
  75. node-version: 12.x
  76. - name: Install and test
  77. run: |
  78. npm ci
  79. npx mocha test/module-systems/browser-test.js
  80. deno-usage:
  81. runs-on: ubuntu-latest
  82. steps:
  83. - uses: actions/checkout@v1
  84. - uses: denolib/setup-deno@master
  85. with:
  86. deno-version: 'v1.0.0'
  87. - run: deno --version
  88. - run: deno test --allow-net=deno.land test/module-systems/deno-test.ts
  89. build-output-sync:
  90. runs-on: ubuntu-latest
  91. steps:
  92. - uses: actions/checkout@v1
  93. - name: Setup Node.js
  94. uses: actions/setup-node@v1
  95. with:
  96. node-version: 12.x
  97. - name: Install, build and check git diff
  98. run: |
  99. npm ci
  100. npm run build
  101. git diff --quiet HEAD --