From 22ec19ff06322731bffebc82f74cd1c5c7bdd28e Mon Sep 17 00:00:00 2001 From: Jordan Harband Date: Tue, 17 Dec 2024 13:30:32 -0800 Subject: [PATCH] [actions] split out node 10-20, and 20+ --- .github/workflows/node-aught.yml | 44 ++++++-------------------- .github/workflows/node-pretest.yml | 29 +++-------------- .github/workflows/node-tens.yml | 48 +++++++---------------------- .github/workflows/node-twenties.yml | 21 +++++++++++++ 4 files changed, 46 insertions(+), 96 deletions(-) create mode 100644 .github/workflows/node-twenties.yml diff --git a/.github/workflows/node-aught.yml b/.github/workflows/node-aught.yml index 3088041..624596f 100644 --- a/.github/workflows/node-aught.yml +++ b/.github/workflows/node-aught.yml @@ -2,46 +2,20 @@ name: 'Tests: node.js < 10' on: [pull_request, push] -jobs: - # tests: - # uses: ljharb/actions/.github/workflows/node.yml@main - # with: - # range: '< 10' - # type: minors - # command: npm run tests-only - - matrix: - runs-on: ubuntu-latest - outputs: - latest: ${{ steps.set-matrix.outputs.requireds }} - steps: - - uses: ljharb/actions/node/matrix@main - id: set-matrix - with: - type: 'minors' - preset: '< 10' +permissions: + contents: read +jobs: tests: - needs: [matrix] - name: 'tests' - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.matrix.outputs.latest) }} - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/install@main - name: 'nvm install ${{ matrix.node-version }} && npm install' - with: - node-version: ${{ matrix.node-version }} - - run: npm run tests-only - - uses: codecov/codecov-action@v2 + uses: ljharb/actions/.github/workflows/node.yml@main + with: + range: '< 10' + type: minors + command: npm run tests-only node: name: 'node < 10' needs: [tests] runs-on: ubuntu-latest steps: - - run: 'echo tests completed' \ No newline at end of file + - run: 'echo tests completed' diff --git a/.github/workflows/node-pretest.yml b/.github/workflows/node-pretest.yml index 6c3654f..88d49f9 100644 --- a/.github/workflows/node-pretest.yml +++ b/.github/workflows/node-pretest.yml @@ -2,28 +2,9 @@ name: 'Tests: pretest/posttest' on: [pull_request, push] -jobs: - # tests: - # uses: ljharb/actions/.github/workflows/pretest.yml@main - - pretest: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/install@main - name: 'nvm install lts/* && npm install' - with: - node-version: 'lts/*' - - run: npm run pretest +permissions: + contents: read - posttest: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/install@main - name: 'nvm install lts/* && npm install' - with: - node-version: 'lts/*' - - run: npm run posttest +jobs: + tests: + uses: ljharb/actions/.github/workflows/pretest.yml@main diff --git a/.github/workflows/node-tens.yml b/.github/workflows/node-tens.yml index e4259de..6b71d59 100644 --- a/.github/workflows/node-tens.yml +++ b/.github/workflows/node-tens.yml @@ -1,47 +1,21 @@ -name: 'Tests: node.js >= 10' +name: 'Tests: node.js 10 - 20' on: [pull_request, push] -jobs: - # tests: - # uses: ljharb/actions/.github/workflows/node.yml@main - # with: - # range: '>= 10' - # type: minors - # command: npm run tests-only - - matrix: - runs-on: ubuntu-latest - outputs: - latest: ${{ steps.set-matrix.outputs.requireds }} - steps: - - uses: ljharb/actions/node/matrix@main - id: set-matrix - with: - type: 'minors' - preset: '>= 10' +permissions: + contents: read +jobs: tests: - needs: [matrix] - name: 'tests' - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: ${{ fromJson(needs.matrix.outputs.latest) }} - - steps: - - uses: actions/checkout@v2 - - uses: ljharb/actions/node/install@main - name: 'nvm install ${{ matrix.node-version }} && npm install' - with: - node-version: ${{ matrix.node-version }} - - run: npm run tests-only - - uses: codecov/codecov-action@v2 + uses: ljharb/actions/.github/workflows/node.yml@main + with: + range: '>= 10 < 20' + type: minors + command: npm run tests-only node: - name: 'node >= 10' + name: 'node 10 - 20' needs: [tests] runs-on: ubuntu-latest steps: - - run: 'echo tests completed' + - run: true diff --git a/.github/workflows/node-twenties.yml b/.github/workflows/node-twenties.yml new file mode 100644 index 0000000..66c9382 --- /dev/null +++ b/.github/workflows/node-twenties.yml @@ -0,0 +1,21 @@ +name: 'Tests: node.js >= 20' + +on: [pull_request, push] + +permissions: + contents: read + +jobs: + tests: + uses: ljharb/actions/.github/workflows/node.yml@main + with: + range: '>= 20' + type: minors + command: npm run tests-only + + node: + name: 'node >= 20' + needs: [tests] + runs-on: ubuntu-latest + steps: + - run: true