Skip to content

Commit

Permalink
Next attempt
Browse files Browse the repository at this point in the history
  • Loading branch information
Rigidity committed Aug 26, 2024
1 parent 26bffc5 commit c3963c3
Showing 1 changed file with 9 additions and 18 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/build-wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,11 +280,8 @@ jobs:

- name: Prepare for coverage
run: |
source <(cargo llvm-cov show-env --export-prefix)
export CARGO_TARGET_DIR=$CARGO_LLVM_COV_TARGET_DIR
export CARGO_INCREMENTAL=1
export RUSTFLAGS="-Zinstrument-coverage"
cargo llvm-cov clean --workspace
source <(cargo llvm-cov show-env --export-prefix)
- name: Install lcov
run: sudo apt-get install lcov
Expand All @@ -301,27 +298,21 @@ jobs:
- name: Build wheel
run: maturin develop --release -m wheel/Cargo.toml

- name: Run tests
run: |
cargo llvm-cov --workspace --all-features --release --lcov --output-path rust.lcov
pytest --cov=chia_rs --cov-report lcov
- name: Rust tests
run: cargo test --workspace --all-features --release

- name: Combine coverage files
run: lcov -a rust.lcov -a coverage.lcov -o combined.lcov
- name: Python tests
run: pytest --cov=chia_rs tests --cov-report lcov

- name: Upload Rust to Coveralls
uses: coverallsapp/github-action@v2
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
with:
path-to-lcov: "./rust.lcov"
- name: Coverage report
run: cargo llvm-cov report --lcov --output-path coverage.lcov

- name: Upload Python to Coveralls
- name: Upload to Coveralls
uses: coverallsapp/github-action@v2
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
with:
path-to-lcov: "./coverage.lcov"
files: ["./coverage.xml", "./coverage.lcov"]

upload:
name: Upload to PyPI (${{ matrix.os.name }} ${{ matrix.python.major-dot-minor }} ${{ matrix.arch.name }})
Expand Down

0 comments on commit c3963c3

Please sign in to comment.