Skip to content

Commit

Permalink
ci: checkout before reporting coverage to coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
sripwoud committed Aug 8, 2024
1 parent a0ca234 commit 682dd0d
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true

env:
LCOV: lcov.info

jobs:
build:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -46,24 +49,25 @@ jobs:
with:
tool: cargo-llvm-cov
- name: Run tests with coverage report
run: cargo llvm-cov --all-features --all-targets --lcov --workspace --output-path lcov.info
run: cargo llvm-cov --all-features --all-targets --lcov --workspace --output-path $LCOV
- name: Upload test coverage report
uses: actions/upload-artifact@v4
with:
name: lcov.info
path: lcov.info
name: $LCOV
path: $LCOV

coverage:
needs: test
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: lcov.info
name: $LCOV
path: .
- uses: coverallsapp/[email protected]
with:
base-path: /
file: lcov.info
file: $LCOV
github-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 682dd0d

Please sign in to comment.