Skip to content

Commit

Permalink
Fix coverage report generation
Browse files Browse the repository at this point in the history
  • Loading branch information
onechiporenko committed Mar 13, 2023
1 parent a4659d4 commit 535d484
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 21 deletions.
62 changes: 47 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,28 +107,60 @@ jobs:
- name: Run Tests
run: ./node_modules/.bin/ember try:one ${{ matrix.try-scenario }}

coverage:
name: Coverage Report
needs: [Test]

coverage-generate:
name: Coverage Report (${{ matrix.try-scenario }})
needs: "test"
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
try-scenario:
- default
- plain-html
- bs4
- bs5
browser:
- Chrome

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 14.x
cache: yarn
- name: Install dependencies
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Generate Report
run: |
chmod +x coverage.sh
./coverage.sh default
./coverage.sh plain-html
./coverage.sh bs4
./coverage.sh bs5
./node_modules/.bin/lcov-result-merger "lcov-*.info" "lcov.info"
- name: Publish report
- name: Generate Coverage Report
run: yarn run test:cov:${{ matrix.try-scenario }}
- uses: actions/upload-artifact@v3
with:
name: lcov-${{ matrix.try-scenario }}.info
path: coverage/lcov.info

coverage-send:
name: Send Coverage Report
runs-on: ubuntu-latest
needs: ["try-scenarios", "coverage-generate"]
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 14.x
cache: yarn
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Download coverage report parts
uses: actions/download-artifact@v3
with:
path: coverage
- name: Combine coverage report parts
run: ./node_modules/.bin/lcov-result-merger "coverage/**/*" "./lcov.info"
- name: Publish coverage report
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
6 changes: 0 additions & 6 deletions coverage.sh

This file was deleted.

0 comments on commit 535d484

Please sign in to comment.