From 5873a301fad5ceb36962de1bf5916ac4e5e6cd3c Mon Sep 17 00:00:00 2001 From: "Jorge C. Leitao" Date: Mon, 30 May 2022 20:52:09 +0000 Subject: [PATCH 1/2] Trying coverage --- .github/workflows/coverage.yml | 32 ++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 28 ---------------------------- 2 files changed, 32 insertions(+), 28 deletions(-) create mode 100644 .github/workflows/coverage.yml diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml new file mode 100644 index 00000000000..b9bf5831d44 --- /dev/null +++ b/.github/workflows/coverage.yml @@ -0,0 +1,32 @@ +name: Coverage + +on: [pull_request, push] + +jobs: + coverage: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + with: + submodules: true # needed to test IPC, which are located in a submodule + - name: Install Rust + run: rustup toolchain install stable --component llvm-tools-preview + - name: Install cargo-llvm-cov + uses: taiki-e/install-action@cargo-llvm-cov + - name: Setup parquet files + run: | + apt update && apt install python3-pip python3-venv -y -q + python3 -m venv venv + source venv/bin/activate + pip install pip --upgrade + pip install pyarrow==6 + python parquet_integration/write_parquet.py + deactivate + - name: Generate code coverage + run: cargo llvm-cov --features full --lcov --output-path lcov.info + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos + files: lcov.info + fail_ci_if_error: true diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 96191833fe1..58abc32ef93 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -111,34 +111,6 @@ jobs: - name: Run run: MIRIFLAGS="-Zmiri-disable-isolation" cargo miri test --tests --features io_ipc,io_json_integration io::ipc::write::write_sliced_list - coverage: - name: Coverage - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - submodules: true - - name: Install Rust - run: rustup update stable - - name: Setup parquet files - run: | - apt update && apt install python3-pip python3-venv -y -q - python3 -m venv venv - source venv/bin/activate - pip install pip --upgrade - pip install pyarrow==6 - python parquet_integration/write_parquet.py - deactivate - - uses: Swatinem/rust-cache@v1 - - name: Install tarpaulin - run: cargo install cargo-tarpaulin - - name: Run coverage - run: | - cargo tarpaulin --features full --ignore-tests --out Xml - - name: Report coverage - continue-on-error: true - run: bash <(curl -s https://codecov.io/bash) - feature-compilation: name: Feature coverage runs-on: ubuntu-latest From 2b9d376bfb0b5e52c9d51e9382e319a31a7ddd96 Mon Sep 17 00:00:00 2001 From: "Jorge C. Leitao" Date: Tue, 31 May 2022 05:16:22 +0000 Subject: [PATCH 2/2] Added cache --- .github/workflows/coverage.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index b9bf5831d44..3007684b17e 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -22,6 +22,7 @@ jobs: pip install pyarrow==6 python parquet_integration/write_parquet.py deactivate + - uses: Swatinem/rust-cache@v1 - name: Generate code coverage run: cargo llvm-cov --features full --lcov --output-path lcov.info - name: Upload coverage to Codecov