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@v4 with: submodules: true - name: Checkout submodules run: git submodule update --init --recursive - 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: | echo "Adding x86_64-unknown-linux-gnu target"; rustup target add x86_64-unknown-linux-gnu; echo "Installing grcov"; cargo install grcov; echo "Running tests"; cargo test --target x86_64-unknown-linux-gnu --verbose; echo "Running ignored tests for coverage"; cargo test discv5_echo -- --ignored --target x86_64-unknown-linux-gnu --verbose; echo "Running default_echo ignored tests for coverage"; cargo test default_echo -- --ignored --target x86_64-unknown-linux-gnu --verbose; mkdir /tmp/cov; echo "Generating coverage report"; 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: waku-bindings-codecov fail_ci_if_error: true