-
-
Notifications
You must be signed in to change notification settings - Fork 2k
106 lines (87 loc) · 2.76 KB
/
codecov.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Code coverage
on:
pull_request:
paths:
- '**.rs'
- '**.py'
- .github/workflows/codecov.yml
push:
branches:
- main
paths:
- '**.rs'
- '**.py'
- .github/workflows/codecov.yml
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
defaults:
run:
working-directory: py-polars
shell: bash
jobs:
coverage:
name: Code Coverage
runs-on: macos-latest
env:
RUSTFLAGS: '-C instrument-coverage --cfg=coverage --cfg=coverage_nightly --cfg=trybuild_no_target'
RUST_BACKTRACE: 1
LLVM_PROFILE_FILE: '/Users/runner/work/polars/polars/target/polars-%p-%3m.profraw'
CARGO_LLVM_COV: 1
CARGO_LLVM_COV_SHOW_ENV: 1
CARGO_LLVM_COV_TARGET_DIR: '/Users/runner/work/polars/polars/target'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Create virtual environment
run: |
python -m venv .venv
echo "$GITHUB_WORKSPACE/py-polars/.venv/bin" >> $GITHUB_PATH
- name: Install dependencies
run: pip install -r requirements-dev.txt
- name: Set up Rust
run: rustup component add llvm-tools-preview
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref_name == 'main' }}
- name: Prepare coverage
run: cargo llvm-cov clean --workspace
- name: Run tests
run: >
cargo test --all-features
-p polars-arrow
-p polars-compute
-p polars-core
-p polars-io
-p polars-lazy
-p polars-ops
-p polars-plan
-p polars-row
-p polars-sql
-p polars-time
-p polars-utils
- name: Run Rust integration tests
run: cargo test --all-features -p polars --test it
- name: Install Polars
run: maturin develop
- name: Run Python tests
run: pytest --cov -n auto --dist loadgroup -m "not benchmark and not docs" --cov-report xml:main.xml
continue-on-error: true
- name: Run Python tests - async reader
env:
POLARS_FORCE_ASYNC: 1
run: pytest --cov -m "not benchmark and not docs" tests/unit/io/ --cov-report xml:async.xml
continue-on-error: true
- name: Report coverage
run: cargo llvm-cov report --lcov --output-path coverage.lcov
- name: Upload coverage information
uses: codecov/codecov-action@v4
with:
files: py-polars/coverage.lcov,py-polars/main.xml,py-polars/async.xml
name: macos
token: ${{ secrets.CODECOV_TOKEN }}