Skip to content

Commit

Permalink
[actions] split out node 10-20, and 20+
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Dec 17, 2024
1 parent 1f6d4de commit 22ec19f
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 96 deletions.
44 changes: 9 additions & 35 deletions .github/workflows/node-aught.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
- run: 'echo tests completed'
29 changes: 5 additions & 24 deletions .github/workflows/node-pretest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
48 changes: 11 additions & 37 deletions .github/workflows/node-tens.yml
Original file line number Diff line number Diff line change
@@ -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
21 changes: 21 additions & 0 deletions .github/workflows/node-twenties.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 22ec19f

Please sign in to comment.