-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(rust): add test coverage ci (#489)
* ci(rust): add test coverage ci * ci(rust): use actions-rs/cargo install llvm-cov * ci(rust): fix working directory * ci(rust): optimize codecov
- Loading branch information
1 parent
0bc9756
commit 585f93e
Showing
7 changed files
with
67 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,7 @@ flags: | |
carryforward: true | ||
paths: | ||
- "golang/**" | ||
rust: | ||
carryforward: true | ||
paths: | ||
- "rust/**" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Rust Coverage | ||
on: | ||
pull_request: | ||
types: [opened, reopened, synchronize] | ||
paths: | ||
- 'rust/**' | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
calculate-coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: true | ||
|
||
- name: Install rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v1 | ||
with: | ||
version: '3.x' | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Install cargo-llvm-cov | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: install | ||
args: cargo-llvm-cov | ||
|
||
- name: Generate code coverage | ||
working-directory: ./rust | ||
run: cargo llvm-cov --all-features --workspace --ignore-filename-regex pb/ --codecov --output-path codecov.json | ||
|
||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: ./rust/codecov.json | ||
flags: rust | ||
verbose: true | ||
fail_ci_if_error: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters