Skip to content

Commit

Permalink
.github: add code coverage (#689)
Browse files Browse the repository at this point in the history
* init

* add codecov.yml
  • Loading branch information
crispheaney authored Nov 10, 2023
1 parent 1a51bea commit 827b84d
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -251,3 +251,33 @@ jobs:
with:
name: build
path: target/deploy/drift.so
code-coverage:
name: Code Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
profile: minimal
override: true
- name: Cache build artefacts
uses: Swatinem/rust-cache@v1
- name: Run package checks
run: cargo check # run package checks
- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
version: '0.15.0'
args: '-- --test-threads 1'
- name: Upload to codecov.io
uses: codecov/[email protected]
with:
token: ${{secrets.CODECOV_TOKEN}}
- name: Archive code coverage results
uses: actions/upload-artifact@v1
with:
name: code-coverage-report
path: cobertura.xml

9 changes: 9 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
comment:
layout: "header, diff, flags, components"

component_management:
individual_components:
- component_id: drift
name: drift
paths:
- programs/drift

0 comments on commit 827b84d

Please sign in to comment.