Skip to content

Commit

Permalink
Merge pull request #3 from sunsided/feature/codecov
Browse files Browse the repository at this point in the history
Add code coverage
  • Loading branch information
sunsided authored May 11, 2024
2 parents 1638b68 + 27dd4d2 commit cbb77da
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,20 @@ jobs:
sudo apt-get update
sudo apt-get install -y libclang-dev libopencv-dev ocl-icd-opencl-dev intel-opencl-icd
- run: env
- name: Build libraries and sample
run: cargo build

- name: Run Docests
run: cargo test --doc

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Generate code coverage
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4.0.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: lcov.info
fail_ci_if_error: true

- name: Run Tests
run: cargo test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
**/*.rs.bk

.idea/
/lcov.info

# End of https://www.toptal.com/developers/gitignore/api/rust,clion

0 comments on commit cbb77da

Please sign in to comment.