diff --git a/.github/workflows/node-4+.yml b/.github/workflows/node-4+.yml new file mode 100644 index 000000000..dad291877 --- /dev/null +++ b/.github/workflows/node-4+.yml @@ -0,0 +1,81 @@ +name: 'Tests: node.js' + +on: [pull_request, push] + +jobs: + matrix: + runs-on: ubuntu-latest + outputs: + latest: ${{ steps.set-matrix.outputs.requireds }} + 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 + - 3 + 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: 5 + eslint: 4 + - node-version: 5 # TODO: fix + eslint: 3 + - node-version: 4 + eslint: 7 + - node-version: 4 + eslint: 6 + - node-version: 4 + eslint: 5 + - node-version: 4 # TODO: fix + eslint: 4 + - node-version: 4 # TODO: fix + eslint: 3 + + steps: + - uses: actions/checkout@v2 + - uses: ljharb/actions/node/run@main + name: 'npm install && npm run tests-only' + with: + after_install: npm uninstall --no-save eslint-config-airbnb-base && npm install --no-save "eslint@${{ matrix.eslint }}" + node-version: ${{ matrix.node-version }} + command: 'test:ci' + 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 000000000..108ec2ad3 --- /dev/null +++ b/.github/workflows/node-pretest.yml @@ -0,0 +1,40 @@ +name: 'Tests: pretest/posttest' + +on: [pull_request, push] + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: ljharb/actions/node/run@main + name: 'npm install && npm run lint' + with: + node-version: 'lts/*' + command: 'lint' + skip-ls-check: true + + flow: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: ljharb/actions/node/run@main + name: 'npm install && npm run flow' + with: + node-version: 'lts/*' + command: 'flow' + 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