Skip to content

CI: Coverage for Rust and Python, including PyO3 #2

CI: Coverage for Rust and Python, including PyO3

CI: Coverage for Rust and Python, including PyO3 #2

Workflow file for this run

name: Coverage
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_NET_RETRY: 10
CI: 1
RUST_BACKTRACE: short
RUSTUP_MAX_RETRIES: 10
PIXI_VERSION: "v0.63.2"
jobs:
coverage:
name: Coverage
timeout-minutes: 30
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
ref: ${{ github.event.pull_request.head.sha }}
persist-credentials: false
- uses: prefix-dev/setup-pixi@a0af7a228712d6121d37aba47adf55c1332c9c2e # v0.9.4
with:
pixi-version: ${{ env.PIXI_VERSION }}
cache: true
activate-environment: true
manifest-path: icechunk-python/pyproject.toml
- name: Cache Dependencies
uses: Swatinem/rust-cache@42dc69e1aa15d09112580998cf2ef0119e2e91ae # v2
with:
prefix-key: "coverage"
shared-key: "rust"
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Stand up docker services
run: just contup
- name: Wait for containers to be ready
run: just contwait
- name: Run coverage
run: just coverage
- name: Upload Rust coverage to Codecov
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage_rust.lcov
flags: rust
name: rust-coverage
fail_ci_if_error: false
- name: Upload Python coverage to Codecov
uses: codecov/codecov-action@75cd11691c0faa626561e295848008c8a7dddffe # v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: coverage.xml
flags: python
name: python-coverage
fail_ci_if_error: false