-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Tests] migrate tests to Github Actions
The OSX tests remain on travis.
- Loading branch information
Showing
11 changed files
with
193 additions
and
92 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
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: | ||
versionsAsRoot: true | ||
type: majors | ||
preset: '>=4' | ||
|
||
latest: | ||
needs: [matrix] | ||
name: 'latest majors' | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: ${{ fromJson(needs.matrix.outputs.latest) }} | ||
eslint: | ||
- 7 | ||
- 6 | ||
- 5 | ||
- 4 | ||
- 3 | ||
- 2 | ||
include: | ||
- node-version: 'lts/*' | ||
eslint: 7 | ||
ts-parser: 2 | ||
env: | ||
TS_PARSER: 2 | ||
exclude: | ||
- node-version: 9 | ||
eslint: 7 | ||
- node-version: 8 | ||
eslint: 7 | ||
- node-version: 7 | ||
eslint: 7 | ||
- node-version: 7 | ||
eslint: 6 | ||
- node-version: 6 | ||
eslint: 7 | ||
- node-version: 6 | ||
eslint: 6 | ||
- node-version: 5 | ||
eslint: 7 | ||
- node-version: 5 | ||
eslint: 6 | ||
- node-version: 5 | ||
eslint: 5 | ||
- node-version: 4 | ||
eslint: 7 | ||
- node-version: 4 | ||
eslint: 6 | ||
- node-version: 4 | ||
eslint: 5 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ljharb/actions/node/run@main | ||
continue-on-error: ${{ matrix.eslint == 4 && matrix.node-version == 4 }} | ||
name: 'npm install && npm run tests-only' | ||
env: | ||
ESLINT_VERSION: ${{ matrix.eslint }} | ||
TRAVIS_NODE_VERSION: ${{ matrix.node-version }} | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
after_install: npm run copy-metafiles && ./tests/dep-time-travel.sh | ||
command: 'tests-only' | ||
after_success: 'npm run coveralls' | ||
skip-ls-check: true | ||
|
||
node: | ||
name: 'node 4+' | ||
needs: [latest] | ||
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,27 @@ | ||
name: 'Tests: pretest/posttest' | ||
|
||
on: [pull_request, push] | ||
|
||
jobs: | ||
# pretest: | ||
# runs-on: ubuntu-latest | ||
|
||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - uses: ljharb/actions/node/run@main | ||
# name: 'npm install && npm run pretest' | ||
# with: | ||
# node-version: 'lts/*' | ||
# command: 'pretest' | ||
|
||
posttest: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ljharb/actions/node/run@main | ||
name: 'npm install && npm run posttest' | ||
with: | ||
node-version: 'lts/*' | ||
command: 'posttest' | ||
skip-ls-check: true |
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,49 @@ | ||
name: 'Tests: packages' | ||
|
||
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: | ||
type: 'majors' | ||
preset: '>=4' | ||
versionsAsRoot: true | ||
|
||
tests: | ||
needs: [matrix] | ||
name: 'packages' | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: ${{ fromJson(needs.matrix.outputs.latest) }} | ||
package: | ||
- resolvers/node | ||
- resolvers/webpack | ||
# - memo-parser | ||
# - utils | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: ljharb/actions/node/run@main | ||
name: 'npm install && npm run tests-only' | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
after_install: npm run copy-metafiles && cd ${{ matrix.package }} && npm install | ||
command: 'tests-only' | ||
after_success: npm run coveralls | ||
skip-ls-check: true | ||
|
||
packages: | ||
name: 'packages: all tests' | ||
needs: [tests] | ||
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
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 @@ | ||
{ | ||
"all": true, | ||
"check-coverage": false, | ||
"reporter": ["text-summary", "text", "html", "json"], | ||
"require": [ | ||
"babel-register" | ||
], | ||
"sourceMap": true, | ||
"instrument": false, | ||
"exclude": [ | ||
"coverage", | ||
"test", | ||
"tests" | ||
] | ||
} |
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
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
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