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

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