Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move coveralls from travis to github actions #4326

Merged
merged 1 commit into from
May 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions .github/workflows/tester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,26 @@ jobs:
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-npm-cache
restore-keys: ${{ runner.OS }}-npm-cache
key: ${{ runner.os }}-npm-cache
restore-keys: ${{ runner.os }}-npm-cache
- name: Install Dependencies
run: npm install
- name: Test
run: npm test
run: npm run test-cov
env:
CI: true
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
flag-name: run-${{ runner.os }}-${{ matrix.node-version }}
parallel: true
coverall-finish:
needs: tester
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
15 changes: 2 additions & 13 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
os:
- linux
os: linux

language: node_js

Expand All @@ -17,17 +16,7 @@ node_js:
- "14"

script:
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then
npm run eslint;
fi
- npm run test-cov
- if [[ $TRAVIS_OS_NAME == "linux" ]]; then
./test/benchmark.sh;
fi

after_script:
- npm install coveralls
- nyc report --reporter=text-lcov | coveralls
- ./test/benchmark.sh;

deploy:
provider: surge
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"scripts": {
"eslint": "eslint .",
"test": "mocha test/index.js",
"test-cov": "nyc npm run test",
"test-cov": "nyc --reporter=lcovonly npm run test",
"lint-staged": "lint-staged"
},
"directories": {
Expand Down