node-4+.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  1. name: 'Tests: node.js'
  2. on: [pull_request, push]
  3. jobs:
  4. matrix:
  5. runs-on: ubuntu-latest
  6. outputs:
  7. latest: ${{ steps.set-matrix.outputs.requireds }}
  8. steps:
  9. - uses: ljharb/actions/node/matrix@main
  10. id: set-matrix
  11. with:
  12. versionsAsRoot: true
  13. type: 'majors'
  14. preset: '>=4'
  15. latest:
  16. needs: [matrix]
  17. name: 'latest majors'
  18. runs-on: ubuntu-latest
  19. strategy:
  20. fail-fast: false
  21. matrix:
  22. node-version: ${{ fromJson(needs.matrix.outputs.latest) }}
  23. eslint:
  24. - 8
  25. - 7
  26. - 6
  27. - 5
  28. - 4
  29. - 3
  30. exclude:
  31. - node-version: 15
  32. eslint: 8
  33. - node-version: 13
  34. eslint: 8
  35. - node-version: 11
  36. eslint: 8
  37. - node-version: 11
  38. eslint: 7
  39. - node-version: 10
  40. eslint: 8
  41. - node-version: 9
  42. eslint: 8
  43. - node-version: 9
  44. eslint: 7
  45. - node-version: 8
  46. eslint: 8
  47. - node-version: 8
  48. eslint: 7
  49. - node-version: 7
  50. eslint: 8
  51. - node-version: 7
  52. eslint: 7
  53. - node-version: 7
  54. eslint: 6
  55. - node-version: 6
  56. eslint: 8
  57. - node-version: 6
  58. eslint: 7
  59. - node-version: 6
  60. eslint: 6
  61. - node-version: 5
  62. eslint: 8
  63. - node-version: 5
  64. eslint: 7
  65. - node-version: 5
  66. eslint: 6
  67. - node-version: 5
  68. eslint: 5
  69. - node-version: 5
  70. eslint: 4
  71. - node-version: 5 # TODO: fix
  72. eslint: 3
  73. - node-version: 4
  74. eslint: 8
  75. - node-version: 4
  76. eslint: 7
  77. - node-version: 4
  78. eslint: 6
  79. - node-version: 4
  80. eslint: 5
  81. - node-version: 4 # TODO: fix
  82. eslint: 4
  83. - node-version: 4 # TODO: fix
  84. eslint: 3
  85. steps:
  86. - uses: actions/checkout@v2
  87. with:
  88. fetch-depth: 0
  89. - uses: ljharb/actions/node/install@main
  90. name: 'nvm install ${{ matrix.node-version }} && npm install'
  91. env:
  92. NPM_CONFIG_LEGACY_PEER_DEPS: true
  93. with:
  94. after_install: npm uninstall --no-save eslint-config-airbnb-base && npm install --no-save "eslint@${{ matrix.eslint }}"
  95. node-version: ${{ matrix.node-version }}
  96. skip-ls-check: true
  97. - run: rm __tests__/src/util/getComputedRole-test.js
  98. if: ${{ matrix.node-version < 7 }}
  99. - run: npm run test:ci
  100. - uses: codecov/codecov-action@v2
  101. node:
  102. name: 'node 4+'
  103. needs: [latest]
  104. runs-on: ubuntu-latest
  105. steps:
  106. - run: 'echo tests completed'