Skip to content

chore: rely on the testing during coverage generation to speed up tests #3431

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

Merged
merged 1 commit into from
May 15, 2025
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
fail-fast: false
matrix:
os:
- ubuntu-latest
# The coverage action actually is running the Linux-based test.
- windows-latest
runs-on: ${{ matrix.os }}
steps:
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
pull_request:
branches: [main, "rust-v*"]

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

jobs:
coverage:
runs-on: ubuntu-latest
Expand All @@ -26,7 +23,7 @@ jobs:
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 --skip test_read_tables_lakefs
run: gmake coverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
Expand Down
26 changes: 23 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,23 @@

.DEFAULT_GOAL := help
DAT_VERSION := 0.0.3
DEFAULT_FEATURES := "azure,datafusion,s3,gcs,glue,hdfs"

# Disable full debug symbol generation to speed up CI build and keep memory down
export RUSTFLAGS:= -C debuginfo=line-tables-only
# Disable incremental builds by cargo for CI which should save disk space
# and hopefully avoid final link "No space left on device"
export CARGO_INCREMENTAL:=0

## begin dat related
####################
.PHONY: setup-dat
setup-dat: dat/deltalake-dat-v$(DAT_VERSION) ## Download and setup the Delta Acceptance Tests (dat)
setup-dat: dat/v$(DAT_VERSION) ## Download and setup the Delta Acceptance Tests (dat)

dat:
mkdir -p dat

dat/deltalake-dat-v$(DAT_VERSION): dat ## Download DAT test files into ./dat
rm -rf dat/v$(DAT_VERSION)
dat/v$(DAT_VERSION): dat ## Download DAT test files into ./dat
curl -L --silent --output dat/deltalake-dat-v$(DAT_VERSION).tar.gz \
https://github.com/delta-incubator/dat/releases/download/v$(DAT_VERSION)/deltalake-dat-v$(DAT_VERSION).tar.gz
tar --no-same-permissions -xzf dat/deltalake-dat-v$(DAT_VERSION).tar.gz
Expand All @@ -28,9 +34,23 @@ dat/deltalake-dat-v$(DAT_VERSION): dat ## Download DAT test files into ./dat
## end dat related


.PHONY: coverage
coverage: setup-dat ## Run Rust tests with code-coverage
cargo llvm-cov --features $(DEFAULT_FEATURES) --workspace \
--codecov \
--output-path codecov.json \
-- --skip read_table_version_hdfs --skip test_read_tables_lakefs

.PHONY: check
check: ## Run basic cargo formatting and other checks (no tests)
cargo fmt -- --check



.PHONY: clean
clean: ## Remove temporary and downloaded artifacts
rm -rf dat
cargo clean

.PHONY: help
help: ## Produce the helpful command listing
Expand Down
Loading