Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: enable codecov reporting #2836

Merged
merged 3 commits into from
Sep 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 32 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
branches: [main, "rust-v*"]
merge_group:

env:
DEFAULT_FEATURES: "azure,datafusion,s3,gcs,glue,hdfs "

jobs:
format:
runs-on: ubuntu-latest
Expand All @@ -23,6 +26,31 @@ jobs:
- name: Format
run: cargo fmt -- --check

coverage:
runs-on: ubuntu-latest
env:
CARGO_TERM_COLOR: always
steps:
- uses: actions/checkout@v4
- name: Install rust
uses: actions-rs/toolchain@v1
with:
profile: default
toolchain: stable
override: true
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- uses: Swatinem/rust-cache@v2
- name: Generate code coverage
run: cargo llvm-cov --features ${DEFAULT_FEATURES} --workspace --codecov --output-path codecov.json -- --skip read_table_version_hdfs
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
files: codecov.json
fail_ci_if_error: true
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

build:
strategy:
fail-fast: false
Expand All @@ -43,13 +71,13 @@ jobs:
override: true

- name: build and lint with clippy
run: cargo clippy --features azure,datafusion,s3,gcs,glue,hdfs --tests
run: cargo clippy --features ${{ env.DEFAULT_FEATURES }} --tests

- name: Spot-check build for native-tls features
run: cargo clippy --no-default-features --features azure,datafusion,s3-native-tls,gcs,glue --tests

- name: Check docs
run: cargo doc --features azure,datafusion,s3,gcs,glue,hdfs
run: cargo doc --features ${{ env.DEFAULT_FEATURES }}

- name: Check no default features (except rustls)
run: cargo check --no-default-features --features rustls
Expand Down Expand Up @@ -80,7 +108,7 @@ jobs:
override: true

- name: Run tests
run: cargo test --verbose --features datafusion,azure
run: cargo test --verbose --features ${{ env.DEFAULT_FEATURES }}

integration_test:
name: Integration Tests
Expand Down Expand Up @@ -130,7 +158,7 @@ jobs:

- name: Run tests with rustls (default)
run: |
cargo test --features integration_test,azure,s3,gcs,datafusion,hdfs
cargo test --features integration_test,${{ env.DEFAULT_FEATURES }}

- name: Run tests with native-tls
run: |
Expand Down
Loading