Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

123 строки
3.0KB

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