mirror of
https://github.com/Portabase/agent.git
synced 2026-10-13 08:11:40 +00:00
b1c14f098b
* feat: add codecov.yml * fix: add codecov.yml * fix: codecov.yml --------- Co-authored-by: charles-gauthereau <charles.gauthereau@soluce-technologies.com>
55 lines
1.1 KiB
YAML
55 lines
1.1 KiB
YAML
name: Codecov Rust
|
|
|
|
on:
|
|
push:
|
|
branches: ["main"]
|
|
pull_request:
|
|
branches: ["main"]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
components: llvm-tools-preview
|
|
|
|
- name: Install grcov
|
|
run: cargo install grcov
|
|
|
|
- name: Build
|
|
run: cargo build --verbose
|
|
|
|
- name: Run tests
|
|
env:
|
|
CARGO_INCREMENTAL: 0
|
|
RUSTFLAGS: "-C instrument-coverage"
|
|
LLVM_PROFILE_FILE: "cargo-test-%p-%m.profraw"
|
|
run: cargo test --verbose
|
|
|
|
- name: Generate coverage
|
|
run: |
|
|
grcov . \
|
|
--binary-path ./target/debug/ \
|
|
-s . \
|
|
-t lcov \
|
|
--branch \
|
|
--ignore-not-existing \
|
|
-o lcov.info
|
|
|
|
- name: Upload to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
files: lcov.info
|
|
verbose: true
|
|
fail_ci_if_error: true
|
|
env:
|
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |