-
Notifications
You must be signed in to change notification settings - Fork 414
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: rearrange github actions a bit
This ensures that the benchmarking and codecov code doesn't run in the merge queue where it doesn't make sense (and also causes unsightly ❌ )
- Loading branch information
Showing
4 changed files
with
90 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
name: coverage | ||
|
||
on: | ||
push: | ||
branches: [main, "rust-v*"] | ||
pull_request: | ||
branches: [main, "rust-v*"] | ||
|
||
env: | ||
DEFAULT_FEATURES: "azure,datafusion,s3,gcs,glue,hdfs " | ||
|
||
jobs: | ||
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: '1.80' | ||
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 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
name: python_benchmark | ||
|
||
|
||
# This is separate from the python_build so that it doesn't need to run on the merge group | ||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
branches: [main] | ||
|
||
defaults: | ||
run: | ||
working-directory: ./python | ||
|
||
jobs: | ||
benchmark: | ||
name: Python Benchmark | ||
runs-on: ubuntu-latest | ||
env: | ||
RUSTFLAGS: "-C debuginfo=line-tables-only" | ||
CARGO_INCREMENTAL: 0 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Environment | ||
uses: ./.github/actions/setup-env | ||
|
||
- name: Build deltalake in release mode | ||
run: | | ||
python -m venv venv | ||
source venv/bin/activate | ||
MATURIN_EXTRA_ARGS=--release make develop | ||
# Download previous benchmark result from cache (if exists) | ||
- name: Download previous benchmark data | ||
uses: actions/cache@v2 | ||
with: | ||
path: ./cache | ||
key: ${{ runner.os }}-benchmark | ||
|
||
- name: Run benchmark | ||
run: | | ||
source venv/bin/activate | ||
pytest tests/test_benchmark.py -m benchmark --benchmark-json output.json | ||
- name: Store benchmark result | ||
uses: benchmark-action/github-action-benchmark@v1 | ||
with: | ||
tool: "pytest" | ||
output-file-path: python/output.json | ||
external-data-json-path: ./cache/benchmark-data.json | ||
fail-on-alert: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters