From 07296cd082576c24e2eb1de75758380a247ec7b2 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Sun, 31 Oct 2021 11:54:23 +0200 Subject: [PATCH] codecov integration --- .github/workflows/codecov.yml | 30 ++++++++++++++++++++++++++++++ .gitignore | 2 ++ 2 files changed, 32 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..5086d5f8 --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,30 @@ +name: code coverage + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: dtolnay/rust-toolchain@nightly + - name: install tools + run: | + rustup component add llvm-tools-preview --toolchain nightly + sudo apt-get install -y curl + curl -LsSf https://github.com/taiki-e/cargo-llvm-cov/releases/latest/download/cargo-llvm-cov-x86_64-unknown-linux-gnu.tar.gz | tar xzf - -C ~/.cargo/bin + - name: llvm + run: | + cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info + - name: Uploade coverage + uses: codecov/codecov-action@v2 + with: + files: lcov.info + fail_ci_if_error: false + token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.gitignore b/.gitignore index 206d5cb6..2457af3f 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,5 @@ src/redisraw/bindings.rs # VS Code .vscode + +lcov.*