-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b811b8f
commit 7aa6c06
Showing
3 changed files
with
72 additions
and
54 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,63 +6,16 @@ | |
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
tags: | ||
- "*" | ||
pull_request: | ||
workflow_dispatch: | ||
workflow_run: | ||
workflows: ["test"] | ||
branches: [release] | ||
types: | ||
- completed | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
coverage: | ||
name: Coverage for ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: ["ubuntu"] | ||
runs-on: ${{ matrix.os }}-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
cache: "pip" | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
profile: minimal | ||
components: llvm-tools-preview | ||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- uses: Swatinem/[email protected] | ||
with: | ||
key: coverage-cargo-${{ matrix.os }} | ||
continue-on-error: true | ||
- name: Setup virtual environment | ||
run: | | ||
python -m venv venv | ||
source venv/bin/activate | ||
pip install -r requirements.txt | ||
- name: Run coverage | ||
run: | | ||
source venv/bin/activate | ||
source <(cargo llvm-cov show-env --export-prefix) | ||
export CARGO_TARGET_DIR=$CARGO_LLVM_COV_TARGET_DIR | ||
export CARGO_INCREMENTAL=1 | ||
cargo llvm-cov clean --workspace | ||
cargo test | ||
maturin develop | ||
pytest tests --cov=foobar --cov-report xml | ||
cargo llvm-cov report --lcov --output-path coverage.lcov | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
files: coverage.lcov,coverage.xml | ||
name: ${{ matrix.os }} | ||
linux: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
|
@@ -149,8 +102,8 @@ jobs: | |
release: | ||
name: Release | ||
runs-on: ubuntu-latest | ||
if: "startsWith(github.ref, 'refs/tags/')" | ||
needs: [linux, windows, macos, sdist] | ||
if: "startsWith(github.ref, 'refs/tags/')" | ||
steps: | ||
- uses: actions/download-artifact@v3 | ||
with: | ||
|
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,65 @@ | ||
# This file is autogenerated by maturin v1.3.1 | ||
# To update, run | ||
# | ||
# maturin generate-ci github | ||
# | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- release | ||
tags: | ||
- "*" | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
coverage: | ||
name: Coverage for ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: ["ubuntu"] | ||
runs-on: ${{ matrix.os }}-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: "3.10" | ||
cache: "pip" | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
profile: minimal | ||
components: llvm-tools-preview | ||
- name: Install cargo-llvm-cov | ||
uses: taiki-e/install-action@cargo-llvm-cov | ||
- uses: Swatinem/[email protected] | ||
with: | ||
key: coverage-cargo-${{ matrix.os }} | ||
continue-on-error: true | ||
- name: Setup virtual environment | ||
run: | | ||
python -m venv venv | ||
source venv/bin/activate | ||
pip install -r requirements.txt | ||
- name: Run coverage | ||
run: | | ||
source venv/bin/activate | ||
source <(cargo llvm-cov show-env --export-prefix) | ||
export CARGO_TARGET_DIR=$CARGO_LLVM_COV_TARGET_DIR | ||
export CARGO_INCREMENTAL=1 | ||
cargo llvm-cov clean --workspace | ||
cargo test | ||
maturin develop | ||
pytest tests --cov=foobar --cov-report xml | ||
cargo llvm-cov report --lcov --output-path coverage.lcov | ||
- uses: codecov/codecov-action@v3 | ||
with: | ||
files: coverage.lcov,coverage.xml | ||
name: ${{ matrix.os }} |
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