Skip to content

Commit

Permalink
ci: fix coveralls report (#599)
Browse files Browse the repository at this point in the history
Collect the coverage locally, then send it to Coveralls.
Do not try to send the packages one-by-one.
  • Loading branch information
Jason3S committed Nov 17, 2020
1 parent b0de78e commit 49c1ff2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 84 deletions.
84 changes: 2 additions & 82 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,93 +19,13 @@ jobs:

- run: npm run coverage

- name: Coveralls cspell
- name: Upload coverage Coveralls
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./packages/cspell/coverage/lcov.info
flag-name: cspell
parallel: true

- name: Coveralls cspell-glob
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./packages/cspell-glob/coverage/lcov.info
flag-name: cspell-glob
parallel: true

- name: Coveralls cspell-io
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./packages/cspell-io/coverage/lcov.info
flag-name: cspell-io
parallel: true

- name: Coveralls cspell-lib
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./packages/cspell-lib/coverage/lcov.info
flag-name: cspell-lib
parallel: true

- name: Coveralls cspell-tools
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./packages/cspell-tools/coverage/lcov.info
flag-name: cspell-tools
parallel: true

- run: head ./packages/cspell-tools/coverage/lcov.info

- name: Coveralls cspell-trie
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./packages/cspell-trie/coverage/lcov.info
flag-name: cspell-trie
parallel: true

- name: Coveralls cspell-trie-lib
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./packages/cspell-trie-lib/coverage/lcov.info
flag-name: cspell-trie-lib
parallel: true

- run: head ./packages/cspell-trie-lib/coverage/lcov.info

- name: Coveralls cspell-trie2-lib
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./packages/cspell-trie2-lib/coverage/lcov.info
flag-name: cspell-trie2-lib
parallel: true

- name: Coveralls cspell-util-bundle
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./packages/cspell-util-bundle/coverage/lcov.info
flag-name: cspell-util-bundle
parallel: true
path-to-lcov: ./lcov.info

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
directory: ./packages/*/coverage/

finished:
needs: coverage
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ lib-cov

# Coverage directory used by tools like istanbul
coverage
lcov.info

# nyc test coverage
.nyc_output
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"check-spelling": "cspell **/{*.ts,*.md}",
"clean-build": "lerna run clean-build",
"clean": "lerna run clean",
"coverage": "npm run gen-coverage",
"gen-coverage": "lerna run coverage",
"coverage": "lerna run coverage --stream && npm run coverage-collect",
"coverage-collect": "globcat packages/*/coverage/lcov.info > lcov.info",
"install": "lerna bootstrap --ci",
"lint": "eslint . --fix && prettier -w \"**/*.{md,yaml,yml,json}\"",
"lint-ci": "eslint . && prettier -c \"**/*.{md,yaml,yml,json}\"",
Expand Down

0 comments on commit 49c1ff2

Please sign in to comment.