Skip to content

Commit be7bf6a

Browse files
committed
[actions] reuse common workflows
See inspect-js/is-arguments#38
1 parent e38cf3c commit be7bf6a

9 files changed

+50
-287
lines changed

.github/workflows/node-4+.yml

-60
This file was deleted.

.github/workflows/node-aught.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: 'Tests: node.js < 10'
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
tests:
7+
uses: ljharb/actions/.github/workflows/node.yml@main
8+
with:
9+
range: '< 10'
10+
type: minors
11+
command: npm run tests-only
12+
13+
node:
14+
name: 'node < 10'
15+
needs: [tests]
16+
runs-on: ubuntu-latest
17+
steps:
18+
- run: 'echo tests completed'

.github/workflows/node-harmony.yml

+7-57
Original file line numberDiff line numberDiff line change
@@ -3,66 +3,16 @@ name: 'Tests: node.js (harmony)'
33
on: [pull_request, push]
44

55
jobs:
6-
matrix:
7-
runs-on: ubuntu-latest
8-
outputs:
9-
stable: ${{ steps.set-matrix.outputs.requireds }}
10-
unstable: ${{ steps.set-matrix.outputs.optionals }}
11-
steps:
12-
- uses: ljharb/actions/node/matrix@main
13-
id: set-matrix
14-
with:
15-
versionsAsRoot: true
16-
preset: '>=0.4 <16'
17-
18-
stable:
19-
needs: [matrix]
20-
name: 'stable minors'
21-
runs-on: ubuntu-latest
22-
23-
strategy:
24-
matrix:
25-
node-version: ${{ fromJson(needs.matrix.outputs.stable) }}
26-
27-
steps:
28-
- uses: actions/checkout@v2
29-
- uses: ljharb/actions/node/install@main
30-
name: 'nvm install ${{ matrix.node-version }} && npm install'
31-
with:
32-
node-version: ${{ matrix.node-version }}
33-
cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
34-
skip-ls-check: true
35-
- run: npm run test:harmony
36-
- uses: codecov/codecov-action@v2
37-
38-
unstable:
39-
needs: [matrix, stable]
40-
name: 'unstable minors'
41-
continue-on-error: true
42-
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }}
43-
runs-on: ubuntu-latest
44-
45-
strategy:
46-
matrix:
47-
node-version: ${{ fromJson(needs.matrix.outputs.unstable) }}
48-
exclude:
49-
- node-version: 0.7
50-
- node-version: 0.4
51-
52-
steps:
53-
- uses: actions/checkout@v2
54-
- uses: ljharb/actions/node/install@main
55-
name: 'nvm install ${{ matrix.node-version }} && npm install'
56-
with:
57-
node-version: ${{ matrix.node-version }}
58-
cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }}
59-
skip-ls-check: true
60-
- run: npm run test:harmony
61-
- uses: codecov/codecov-action@v2
6+
tests:
7+
uses: ljharb/actions/.github/workflows/node.yml@main
8+
with:
9+
range: '>0.4 <16'
10+
type: minors
11+
command: npm run test:harmony
6212

6313
node:
6414
name: 'node: harmony'
65-
needs: [stable, unstable]
15+
needs: [tests]
6616
runs-on: ubuntu-latest
6717
steps:
6818
- run: 'echo tests completed'

.github/workflows/node-iojs.yml

-71
This file was deleted.

.github/workflows/node-pretest.yml

+2-21
Original file line numberDiff line numberDiff line change
@@ -3,24 +3,5 @@ name: 'Tests: pretest/posttest'
33
on: [pull_request, push]
44

55
jobs:
6-
pretest:
7-
runs-on: ubuntu-latest
8-
9-
steps:
10-
- uses: actions/checkout@v2
11-
- uses: ljharb/actions/node/install@main
12-
name: 'nvm install lts/* && npm install'
13-
with:
14-
node-version: 'lts/*'
15-
- run: npm run pretest
16-
17-
posttest:
18-
runs-on: ubuntu-latest
19-
20-
steps:
21-
- uses: actions/checkout@v2
22-
- uses: ljharb/actions/node/install@main
23-
name: 'nvm install lts/* && npm install'
24-
with:
25-
node-version: 'lts/*'
26-
- run: npm run posttest
6+
tests:
7+
uses: ljharb/actions/.github/workflows/pretest.yml@main

.github/workflows/node-tens.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: 'Tests: node.js >= 10'
2+
3+
on: [pull_request, push]
4+
5+
jobs:
6+
tests:
7+
uses: ljharb/actions/.github/workflows/node.yml@main
8+
with:
9+
range: '>= 10'
10+
type: minors
11+
command: npm run tests-only
12+
13+
node:
14+
name: 'node >= 10'
15+
needs: [tests]
16+
runs-on: ubuntu-latest
17+
steps:
18+
- run: 'echo tests completed'

.github/workflows/node-zero.yml

-73
This file was deleted.

.github/workflows/rebase.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v2
13-
- uses: ljharb/rebase@master
14-
env:
15-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
12+
- uses: actions/checkout@v2
13+
- uses: ljharb/rebase@master
14+
env:
15+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/require-allow-edits.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: ljharb/require-allow-edits@main
12+
- uses: ljharb/require-allow-edits@main

0 commit comments

Comments
 (0)