-
-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[actions] use
node/install
instead of node/run
; use codecov
action
- Loading branch information
Showing
9 changed files
with
259 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
coverage/ | ||
.nyc_output/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: 'Tests: node.js' | ||
|
||
on: [pull_request, push] | ||
|
||
jobs: | ||
matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
latest: ${{ steps.set-matrix.outputs.requireds }} | ||
minors: ${{ steps.set-matrix.outputs.optionals }} | ||
steps: | ||
- uses: ljharb/actions/node/matrix@main | ||
id: set-matrix | ||
with: | ||
preset: '>=4' | ||
|
||
latest: | ||
needs: [matrix] | ||
name: 'latest minors' | ||
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@v1 | ||
|
||
minors: | ||
needs: [matrix, latest] | ||
name: 'non-latest minors' | ||
continue-on-error: true | ||
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.matrix.outputs.minors) }} | ||
|
||
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@v1 | ||
|
||
node: | ||
name: 'node 4+' | ||
needs: [latest, minors] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: 'echo tests completed' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: 'Tests: node.js (io.js)' | ||
|
||
on: [pull_request, push] | ||
|
||
jobs: | ||
matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
latest: ${{ steps.set-matrix.outputs.requireds }} | ||
minors: ${{ steps.set-matrix.outputs.optionals }} | ||
steps: | ||
- uses: ljharb/actions/node/matrix@main | ||
id: set-matrix | ||
with: | ||
preset: 'iojs' | ||
|
||
latest: | ||
needs: [matrix] | ||
name: 'latest minors' | ||
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 }} | ||
skip-ls-check: true | ||
- run: npm run tests-only | ||
- uses: codecov/codecov-action@v1 | ||
|
||
minors: | ||
needs: [matrix, latest] | ||
name: 'non-latest minors' | ||
continue-on-error: true | ||
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.matrix.outputs.minors) }} | ||
|
||
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 }} | ||
skip-ls-check: true | ||
- run: npm run tests-only | ||
- uses: codecov/codecov-action@v1 | ||
|
||
node: | ||
name: 'io.js' | ||
needs: [latest, minors] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: 'echo tests completed' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
name: 'Tests: pretest/posttest' | ||
|
||
on: [pull_request, push] | ||
|
||
jobs: | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: 'Tests: node.js (0.x)' | ||
|
||
on: [pull_request, push] | ||
|
||
jobs: | ||
matrix: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
stable: ${{ steps.set-matrix.outputs.requireds }} | ||
unstable: ${{ steps.set-matrix.outputs.optionals }} | ||
steps: | ||
- uses: ljharb/actions/node/matrix@main | ||
id: set-matrix | ||
with: | ||
preset: '0.x' | ||
|
||
stable: | ||
needs: [matrix] | ||
name: 'stable minors' | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.matrix.outputs.stable) }} | ||
|
||
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 }} | ||
cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} | ||
skip-ls-check: true | ||
- run: npm run tests-only | ||
- uses: codecov/codecov-action@v1 | ||
|
||
unstable: | ||
needs: [matrix, stable] | ||
name: 'unstable minors' | ||
continue-on-error: true | ||
if: ${{ !github.head_ref || !startsWith(github.head_ref, 'renovate') }} | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: ${{ fromJson(needs.matrix.outputs.unstable) }} | ||
|
||
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 }} | ||
cache-node-modules-key: node_modules-${{ github.workflow }}-${{ github.action }}-${{ github.run_id }} | ||
skip-ls-check: true | ||
- run: npm run tests-only | ||
- uses: codecov/codecov-action@v1 | ||
|
||
node: | ||
name: 'node 0.x' | ||
needs: [stable, unstable] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- run: 'echo tests completed' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Automatic Rebase | ||
|
||
on: [pull_request_target] | ||
|
||
jobs: | ||
_: | ||
name: "Automatic Rebase" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ljharb/rebase@master | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Require “Allow Edits” | ||
|
||
on: [pull_request_target] | ||
|
||
jobs: | ||
_: | ||
name: "Require “Allow Edits”" | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: ljharb/require-allow-edits@main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"all": true, | ||
"check-coverage": false, | ||
"reporter": ["text-summary", "text", "html", "json"], | ||
"exclude": [ | ||
"bin/import-or-require.js", | ||
"coverage", | ||
"example", | ||
"test" | ||
] | ||
} |