Skip to content

Commit

Permalink
[Tests] temporarily use actions instead of composable workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
ljharb committed Mar 20, 2022
1 parent dc40bf6 commit b0bb153
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 13 deletions.
41 changes: 35 additions & 6 deletions .github/workflows/node-aught.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,45 @@ 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'

tests:
uses: ljharb/actions/.github/workflows/node.yml@main
with:
range: '< 10'
type: minors
command: npm run tests-only
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

node:
name: 'node < 10'
needs: [tests]
runs-on: ubuntu-latest
steps:
- run: 'echo tests completed'
- run: 'echo tests completed'
26 changes: 24 additions & 2 deletions .github/workflows/node-pretest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,27 @@ name: 'Tests: pretest/posttest'
on: [pull_request, push]

jobs:
tests:
uses: ljharb/actions/.github/workflows/pretest.yml@main
# 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

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
39 changes: 34 additions & 5 deletions .github/workflows/node-tens.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,41 @@ 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'

tests:
uses: ljharb/actions/.github/workflows/node.yml@main
with:
range: '>= 10'
type: minors
command: npm run tests-only
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

node:
name: 'node >= 10'
Expand Down

0 comments on commit b0bb153

Please sign in to comment.