diff --git a/.eslintignore b/.eslintignore index 4ebc8aea50..404abb2212 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1 +1 @@ -coverage +coverage/ diff --git a/.github/workflows/node-4+.yml b/.github/workflows/node-4+.yml new file mode 100644 index 0000000000..7409fe9583 --- /dev/null +++ b/.github/workflows/node-4+.yml @@ -0,0 +1,74 @@ +name: 'Tests: node.js' + +on: [pull_request, push] + +jobs: + matrix: + runs-on: ubuntu-latest + outputs: + latest: ${{ steps.set-matrix.outputs.requireds }} + minors: ${{ steps.set-matrix.outputs.optionals }} + steps: + - uses: ljharb/actions/node/matrix@main + id: set-matrix + with: + versionsAsRoot: true + type: majors + preset: '>=4' + + latest: + needs: [matrix] + name: 'latest majors' + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: ${{ fromJson(needs.matrix.outputs.latest) }} + eslint: + - 7 + - 6 + - 5 + - 4 + exclude: + - node-version: 9 + eslint: 7 + - node-version: 8 + eslint: 7 + - node-version: 7 + eslint: 7 + - node-version: 7 + eslint: 6 + - node-version: 6 + eslint: 7 + - node-version: 6 + eslint: 6 + - node-version: 5 + eslint: 7 + - node-version: 5 + eslint: 6 + - node-version: 5 + eslint: 5 + - node-version: 4 + eslint: 7 + - node-version: 4 + eslint: 6 + - node-version: 4 + eslint: 5 + + steps: + - uses: actions/checkout@v2 + - uses: ljharb/actions/node/run@main + name: 'npm install && npm run tests-only' + with: + after_install: npm install --no-save "eslint@${{ matrix.eslint }}" + node-version: ${{ matrix.node-version }} + command: 'unit-test' + after_success: 'npm run coveralls' + skip-ls-check: true + + node: + name: 'node 4+' + needs: [latest] + runs-on: ubuntu-latest + steps: + - run: 'echo tests completed' diff --git a/.github/workflows/node-pretest.yml b/.github/workflows/node-pretest.yml new file mode 100644 index 0000000000..6bb490b13f --- /dev/null +++ b/.github/workflows/node-pretest.yml @@ -0,0 +1,28 @@ +name: 'Tests: pretest/posttest' + +on: [pull_request, push] + +jobs: + pretest: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: ljharb/actions/node/run@main + name: 'npm install && npm run pretest' + with: + node-version: 'lts/*' + command: 'pretest' + skip-ls-check: true + + posttest: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: ljharb/actions/node/run@main + name: 'npm install && npm run posttest' + with: + node-version: 'lts/*' + command: 'posttest' + skip-ls-check: true diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 79c09a969d..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,53 +0,0 @@ -sudo: false -language: node_js -node_js: - - '15' - - '14' - - '12' - - '10' - - '8' - - '6' - - '4' -before_install: - - 'nvm install-latest-npm' -before_script: - - 'if [ -n "${ESLINT-}" ]; then npm install --no-save "eslint@${ESLINT}" ; fi' -script: - - 'if [ -n "${PRETEST-}" ]; then npm run pretest ; fi' - - 'if [ -n "${TEST-}" ]; then npm run unit-test ; fi' - - 'if [ -n "${POSTTEST-}" ]; then npm run posttest ; fi' - - 'if [ -n "${README-}" ]; then npm run generate-list-of-rules:check ; fi' -env: - global: - - TEST=true - matrix: - - ESLINT=7 - - ESLINT=6 - - ESLINT=5 - - ESLINT=4 -after_success: - - 'if [ -n "${TEST-}" ]; then npm run coveralls ; fi' -matrix: - fast_finish: true - include: - - node_js: 'lts/*' - env: PRETEST=true - - node_js: 'lts/*' - env: POSTTEST=true - - node_js: 'lts/*' - env: README=true - exclude: - - node_js: '4' - env: ESLINT=5 - - node_js: '4' - env: ESLINT=6 - - node_js: '6' - env: ESLINT=6 - - node_js: '4' - env: ESLINT=7 - - node_js: '6' - env: ESLINT=7 - - node_js: '8' - env: ESLINT=7 - allow_failures: - - node_js: '11'