From 1cbdbf0bfe04f2cd7f0f7e6d76e79e482a2490e1 Mon Sep 17 00:00:00 2001 From: gusto Date: Mon, 4 Sep 2023 10:27:44 +0300 Subject: [PATCH] GH Actions: Codecov (#366) * Add codecov gh action * Skip integration tests --- .github/workflows/codecov.yml | 45 +++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 00000000..87a758bd --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,45 @@ +on: + pull_request: + push: + branches: + - master + +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: + go-version: '1.19' + - 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; + cargo test --no-default-features --features waku -- --skip ten_nodes_happy --skip two_nodes_happy --skip ten_nodes_one_down + cargo test --no-default-features --features libp2p -- --skip ten_nodes_happy --skip two_nodes_happy --skip ten_nodes_one_down + 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: + token: ${{ secrets.CODECOV_TOKEN }} + directory: /tmp/cov/ + name: nomos-node-codecov + fail_ci_if_error: true + +