Skip to content

Apache DataFusion SQL Query Engine

chore: try fix CI coverage (#2608)

Yang Jianga660ff223d2c
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index d2142bd7b7..8add12b250 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -334,6 +334,50 @@ jobs:
CARGO_HOME: "/github/home/.cargo"
CARGO_TARGET_DIR: "/github/home/target"
+ coverage:
+ name: Coverage
+ runs-on: ubuntu-latest
+ strategy:
+ matrix:
+ arch: [ amd64 ]
+ rust: [ stable ]
+ steps:
+ - uses: actions/checkout@v2
+ with:
+ submodules: true
+ - name: Setup Rust toolchain
+ run: |
+ rustup toolchain install ${{ matrix.rust }}
+ rustup default ${{ matrix.rust }}
+ rustup component add rustfmt clippy
+ - name: Cache Cargo
+ uses: actions/cache@v2
+ 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: Cache Rust dependencies
+ uses: actions/cache@v2
+ with:
+ path: /home/runner/target
+ # this key is not equal because coverage uses different compilation flags.
+ key: ${{ runner.os }}-${{ matrix.arch }}-target-coverage-cache3-${{ matrix.rust }}-
+ - name: Run coverage
+ run: |
+ export CARGO_HOME="/home/runner/.cargo"
+ export CARGO_TARGET_DIR="/home/runner/target"
+
+ export ARROW_TEST_DATA=$(pwd)/testing/data
+ export PARQUET_TEST_DATA=$(pwd)/parquet-testing/data
+
+ 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
needs: [linux-build-lib]
@@ -508,44 +552,3 @@ jobs:
env:
CARGO_HOME: "/github/home/.cargo"
CARGO_TARGET_DIR: "/github/home/target"
-
-# Coverage job was failing. https://github.com/apache/arrow-datafusion/issues/590 tracks re-instating it
-
-# coverage:
-# name: Coverage
-# runs-on: ubuntu-latest
-# strategy:
-# matrix:
-# arch: [amd64]
-# rust: [stable]
-# steps:
-# - uses: actions/checkout@v2
-# with:
-# submodules: true
-# - name: Cache Cargo
-# uses: actions/cache@v2
-# 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-cache-
-# - name: Cache Rust dependencies
-# uses: actions/cache@v2
-# with:
-# path: /home/runner/target
-# # this key is not equal because coverage uses different compilation flags.
-# key: ${{ runner.os }}-${{ matrix.arch }}-target-coverage-cache-${{ matrix.rust }}-
-# - name: Run coverage
-# run: |
-# export ARROW_TEST_DATA=$(pwd)/testing/data
-# export PARQUET_TEST_DATA=$(pwd)/parquet-testing/data
-
-# # 2020-11-15: There is a cargo-tarpaulin regression in 0.17.0
-# # see https://github.com/xd009642/tarpaulin/issues/618
-# cargo install --version 0.16.0 cargo-tarpaulin
-# cargo tarpaulin --out Xml
-# env:
-# CARGO_HOME: "/home/runner/.cargo"
-# CARGO_TARGET_DIR: "/home/runner/target"
-# - name: Report coverage
-# continue-on-error: true
-# run: bash <(curl -s https://codecov.io/bash)
diff --git a/datafusion/core/tests/order_spill_fuzz.rs b/datafusion/core/tests/order_spill_fuzz.rs
index 4545cfa80f..a2d47629b9 100644
--- a/datafusion/core/tests/order_spill_fuzz.rs
+++ b/datafusion/core/tests/order_spill_fuzz.rs
@@ -35,11 +35,13 @@ use rand::{Rng, SeedableRng};
use std::sync::Arc;
#[tokio::test]
+#[cfg_attr(tarpaulin, ignore)]
async fn test_sort_1k_mem() {
run_sort(1024, vec![(5, false), (2000, true), (1000000, true)]).await
}
#[tokio::test]
+#[cfg_attr(tarpaulin, ignore)]
async fn test_sort_100k_mem() {
run_sort(102400, vec![(5, false), (2000, false), (1000000, true)]).await
}
diff --git a/datafusion/core/tests/sql/explain_analyze.rs b/datafusion/core/tests/sql/explain_analyze.rs
index 759edf6fc5..472fe15d26 100644
--- a/datafusion/core/tests/sql/explain_analyze.rs
+++ b/datafusion/core/tests/sql/explain_analyze.rs
@@ -736,6 +736,7 @@ async fn test_physical_plan_display_indent_multi_children() {
}
#[tokio::test]
+#[cfg_attr(tarpaulin, ignore)]
async fn csv_explain() {
// This test uses the execute function that create full plan cycle: logical, optimized logical, and physical,
// then execute the physical plan and return the final explain results
@@ -772,6 +773,7 @@ async fn csv_explain() {
}
#[tokio::test]
+#[cfg_attr(tarpaulin, ignore)]
async fn csv_explain_analyze() {
// This test uses the execute function to run an actual plan under EXPLAIN ANALYZE
let ctx = SessionContext::new();
@@ -793,6 +795,7 @@ async fn csv_explain_analyze() {
}
#[tokio::test]
+#[cfg_attr(tarpaulin, ignore)]
async fn csv_explain_analyze_verbose() {
// This test uses the execute function to run an actual plan under EXPLAIN VERBOSE ANALYZE
let ctx = SessionContext::new();
diff --git a/datafusion/core/tests/sql/json.rs b/datafusion/core/tests/sql/json.rs
index a74076415a..99032092d3 100644
--- a/datafusion/core/tests/sql/json.rs
+++ b/datafusion/core/tests/sql/json.rs
@@ -72,6 +72,7 @@ async fn json_single_nan_schema() {
}
#[tokio::test]
+#[cfg_attr(tarpaulin, ignore)]
async fn json_explain() {
let ctx = SessionContext::new();
let path = format!("{}/2.json", TEST_DATA_BASE);