2022-12-19 10:11:16 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
2023-01-03 10:36:30 +00:00
|
|
|
- master
|
2022-12-19 10:11:16 +00:00
|
|
|
|
|
|
|
name: Codecov
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: Test
|
|
|
|
env:
|
|
|
|
RUSTFLAGS: -C instrument-coverage
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true
|
|
|
|
- name: Checkout submodules
|
|
|
|
run: git submodule update --init --recursive
|
|
|
|
- uses: actions/setup-go@v3 # we need go to build go-waku
|
|
|
|
with:
|
2023-11-07 19:50:35 +00:00
|
|
|
go-version: '1.20'
|
2022-12-19 10:11:16 +00:00
|
|
|
- uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
components: llvm-tools-preview
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
continue-on-error: true
|
|
|
|
- run: |
|
|
|
|
cargo install grcov;
|
2023-01-27 09:35:07 +00:00
|
|
|
cargo test --all-features;
|
|
|
|
cargo test discv5_echo -- --ignored;
|
|
|
|
cargo test default_echo -- --ignored;
|
2022-12-19 10:11:16 +00:00
|
|
|
mkdir /tmp/cov;
|
|
|
|
grcov . --binary-path ./target/debug/ -s . -t lcov --branch --ignore-not-existing --ignore '../*' --ignore "/*" -o /tmp/cov/tests.lcov;
|
|
|
|
- uses: codecov/codecov-action@v3
|
|
|
|
with:
|
2023-01-27 09:35:07 +00:00
|
|
|
token: ${{ secrets.CODECOV_TOKEN }}
|
2022-12-19 10:11:16 +00:00
|
|
|
directory: /tmp/cov/
|
|
|
|
name: waku-bindings-codecov
|
|
|
|
fail_ci_if_error: true
|
|
|
|
|
|
|
|
|