-
-
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.
[ci] GithubActions: Convert the appveyor pipeline to Github Actions
- Loading branch information
1 parent
c77c1a6
commit 2549192
Showing
1 changed file
with
69 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
name: Native and WSL | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-latest] | ||
node-version: [16, 14, 12, 10, 8] | ||
exclude: | ||
- os: ubuntu-latest | ||
node-version: 8 | ||
- os: ubuntu-latest | ||
node-version: 6 | ||
- os: ubuntu-latest | ||
node-version: 4 | ||
include: | ||
- os: ubuntu-latest | ||
npm-version: 6 | ||
eslint-version: 7 | ||
- os: windows-latest | ||
npm-version: 6 | ||
eslint-version: 7 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- name: Install dependencies | ||
run: | | ||
npm install | ||
npm run copy-metafiles | ||
bash ./tests/dep-time-travel.sh 2>&1 | ||
git config core.symlinks true | ||
git reset --hard | ||
- name: Install dependencies of resolvers | ||
run: | | ||
for dir in ./resolvers/*/ | ||
do | ||
dir=${dir%*/} | ||
pushd ${dir} | ||
npm install | ||
popd | ||
done | ||
- name: Install proper eslint-version | ||
run: npm install --no-save eslint@${{ matrix.eslint-version }} | ||
- name: Run tests | ||
run: | | ||
npm run pretest | ||
npm run tests-only | ||
for dir in ./resolvers/*/ | ||
do | ||
dir=${dir%*/} | ||
pushd ${dir} | ||
npm test | ||
popd | ||
done | ||
- name: Codecov | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | ||
file: ./coverage/coverage-final.json # optional | ||
flags: unittests # optional | ||
name: codecov-umbrella # optional | ||
fail_ci_if_error: true # optional (default = false) |