mirror of
https://github.com/logos-messaging/logos-messaging-rust-bindings.git
synced 2026-01-02 14:03:12 +00:00
59 lines
1.4 KiB
YAML
59 lines
1.4 KiB
YAML
name: Codecov
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
test:
|
|
name: Test
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
RUSTFLAGS: "-C instrument-coverage -C force-frame-pointers=yes -C no-stack-check"
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: true
|
|
|
|
- name: Checkout submodules
|
|
run: git submodule update --init --recursive
|
|
|
|
- uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Install llvm-tools and grcov
|
|
run: |
|
|
rustup component add llvm-tools-preview
|
|
cargo install grcov
|
|
|
|
- name: Clean previous builds
|
|
run: cargo clean
|
|
|
|
- name: Run tests with coverage
|
|
run: |
|
|
cargo test --verbose
|
|
cargo test discv5_echo -- --ignored --verbose
|
|
cargo test default_echo -- --ignored --verbose
|
|
|
|
- name: Generate coverage report
|
|
run: |
|
|
mkdir -p /tmp/cov
|
|
grcov ./target/debug/ \
|
|
--binary-path ./target/debug/ \
|
|
-s . \
|
|
-t lcov \
|
|
--branch \
|
|
--ignore-not-existing \
|
|
--ignore '../*' \
|
|
--ignore '/*' \
|
|
-o /tmp/cov/tests.lcov
|
|
|
|
- uses: codecov/codecov-action@v3
|
|
with:
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
|
directory: /tmp/cov/
|
|
name: waku-bindings-codecov
|
|
fail_ci_if_error: true
|