ci: upload coverage to codecov (#25)

This commit is contained in:
Felix Angelov
2023-06-09 13:36:35 -07:00
committed by GitHub
parent bce1508787
commit 8eb3a46446
3 changed files with 17 additions and 2 deletions
+11 -1
View File
@@ -2,6 +2,9 @@ name: Rust Crate Workflow
description: Build and test your Rust crate
inputs:
codecov_token:
required: true
description: The codecov token used to upload coverage reports.
working_directory:
required: false
default: "."
@@ -18,4 +21,11 @@ runs:
- name: Test
working-directory: ${{ inputs.working_directory }}
shell: ${{ inputs.shell }}
run: cargo test --verbose
run: |
cargo install cargo-llvm-cov
cargo llvm-cov --lcov --output-path lcov.info
- name: Upload Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ inputs.codecov_token }}
+2
View File
@@ -2,6 +2,7 @@ name: ci
on:
pull_request:
push:
branches:
- main
@@ -56,6 +57,7 @@ jobs:
- name: 🦀 Build ${{ matrix.package }}
uses: ./.github/actions/rust_crate
with:
codecov_token: ${{ secrets.CODECOV_TOKEN }}
working_directory: ${{ matrix.crate }}
ci: