From e6c1f510f0e90847c4f2680e144673a2d7fc43af Mon Sep 17 00:00:00 2001 From: Piotr Findeisen <piotr.findeisen@gmail.com> Date: Tue, 2 Jul 2024 19:52:59 +0200 Subject: [PATCH] Re-enable coverage job --- .github/workflows/rust.yml | 79 ++++++++++++++++++-------------------- 1 file changed, 38 insertions(+), 41 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index ce4b4b06cf44e..6498e1a938eca 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -424,47 +424,44 @@ jobs: echo '' > datafusion/proto/src/generated/datafusion.rs ci/scripts/rust_fmt.sh - # Coverage job disabled due to - # https://github.com/apache/datafusion/issues/3678 - - # coverage: - # name: coverage - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v4 - # with: - # submodules: true - # - name: Install protobuf compiler - # shell: bash - # run: | - # mkdir -p $HOME/d/protoc - # cd $HOME/d/protoc - # export PROTO_ZIP="protoc-21.4-linux-x86_64.zip" - # curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v21.4/$PROTO_ZIP - # unzip $PROTO_ZIP - # export PATH=$PATH:$HOME/d/protoc/bin - # protoc --version - # - name: Setup Rust toolchain - # run: | - # rustup toolchain install stable - # rustup default stable - # rustup component add rustfmt clippy - # - name: Cache Cargo - # uses: actions/cache@v4 - # with: - # path: /home/runner/.cargo - # # this key is not equal because the user is different than on a container (runner vs github) - # key: cargo-coverage-cache3- - # - name: Run coverage - # run: | - # export PATH=$PATH:$HOME/d/protoc/bin - # rustup toolchain install stable - # rustup default stable - # cargo install --version 0.20.1 cargo-tarpaulin - # cargo tarpaulin --all --out Xml - # - name: Report coverage - # continue-on-error: true - # run: bash <(curl -s https://codecov.io/bash) + coverage: + name: coverage + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + - name: Install protobuf compiler + shell: bash + run: | + mkdir -p $HOME/d/protoc + cd $HOME/d/protoc + export PROTO_ZIP="protoc-21.4-linux-x86_64.zip" + curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v21.4/$PROTO_ZIP + unzip $PROTO_ZIP + export PATH=$PATH:$HOME/d/protoc/bin + protoc --version + - name: Setup Rust toolchain + run: | + rustup toolchain install stable + rustup default stable + rustup component add rustfmt clippy + - name: Cache Cargo + uses: actions/cache@v4 + with: + path: /home/runner/.cargo + # this key is not equal because the user is different than on a container (runner vs github) + key: cargo-coverage-cache3- + - name: Run coverage + run: | + export PATH=$PATH:$HOME/d/protoc/bin + rustup toolchain install stable + rustup default stable + cargo install --version 0.20.1 cargo-tarpaulin + cargo tarpaulin --all --out Xml + - name: Report coverage + continue-on-error: true + run: bash <(curl -s https://codecov.io/bash) clippy: name: clippy