-
Notifications
You must be signed in to change notification settings - Fork 796
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pyo3-build-config: increased test coverage
- Loading branch information
1 parent
8fb4ce6
commit b7e192f
Showing
2 changed files
with
67 additions
and
21 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 |
---|---|---|
|
@@ -42,16 +42,33 @@ jobs: | |
name: python${{ matrix.python-version }}-${{ matrix.platform.python-architecture }} ${{ matrix.platform.os }} ${{ matrix.msrv }} | ||
runs-on: ${{ matrix.platform.os }} | ||
strategy: | ||
fail-fast: false # If one platform fails, allow the rest to keep testing. | ||
fail-fast: false # If one platform fails, allow the rest to keep testing. | ||
matrix: | ||
rust: [stable] | ||
python-version: [3.6, 3.7, 3.8, 3.9, 3.10-dev, pypy-3.6, pypy-3.7] | ||
platform: [ | ||
{ os: "macos-latest", python-architecture: "x64", rust-target: "x86_64-apple-darwin" }, | ||
{ os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" }, | ||
{ os: "windows-latest", python-architecture: "x64", rust-target: "x86_64-pc-windows-msvc" }, | ||
{ os: "windows-latest", python-architecture: "x86", rust-target: "i686-pc-windows-msvc" }, | ||
] | ||
platform: | ||
[ | ||
{ | ||
os: "macos-latest", | ||
python-architecture: "x64", | ||
rust-target: "x86_64-apple-darwin", | ||
}, | ||
{ | ||
os: "ubuntu-latest", | ||
python-architecture: "x64", | ||
rust-target: "x86_64-unknown-linux-gnu", | ||
}, | ||
{ | ||
os: "windows-latest", | ||
python-architecture: "x64", | ||
rust-target: "x86_64-pc-windows-msvc", | ||
}, | ||
{ | ||
os: "windows-latest", | ||
python-architecture: "x86", | ||
rust-target: "i686-pc-windows-msvc", | ||
}, | ||
] | ||
exclude: | ||
# There is no 64-bit pypy on windows for pypy-3.6 | ||
- python-version: pypy-3.6 | ||
|
@@ -63,7 +80,12 @@ jobs: | |
# Test minimal supported Rust version | ||
- rust: 1.41.1 | ||
python-version: 3.9 | ||
platform: { os: "ubuntu-latest", python-architecture: "x64", rust-target: "x86_64-unknown-linux-gnu" } | ||
platform: | ||
{ | ||
os: "ubuntu-latest", | ||
python-architecture: "x64", | ||
rust-target: "x86_64-unknown-linux-gnu", | ||
} | ||
msrv: "MSRV" | ||
|
||
steps: | ||
|
@@ -146,6 +168,9 @@ jobs: | |
- name: Test proc-macro code | ||
run: cargo test --manifest-path=pyo3-macros-backend/Cargo.toml | ||
|
||
- name: Test build config | ||
run: cargo test --manifest-path=pyo3-build-config/Cargo.toml | ||
|
||
- name: Install python test dependencies | ||
run: python -m pip install -U pip tox | ||
|
||
|
@@ -193,8 +218,10 @@ jobs: | |
override: true | ||
profile: minimal | ||
components: llvm-tools-preview | ||
- run: LLVM_PROFILE_FILE="coverage-%p-%m.profraw" cargo test --no-default-features --no-fail-fast | ||
- run: LLVM_PROFILE_FILE="coverage-features-%p-%m.profraw" cargo test --no-default-features --no-fail-fast --features "macros num-bigint num-complex hashbrown serde multiple-pymethods" | ||
- run: cargo test --no-default-features --no-fail-fast | ||
- run: cargo test --no-default-features --no-fail-fast --features "macros num-bigint num-complex hashbrown serde multiple-pymethods" | ||
- run: cargo test --manifest-path=pyo3-macros-backend/Cargo.toml | ||
- run: cargo test --manifest-path=pyo3-build-config/Cargo.toml | ||
# can't yet use actions-rs/grcov with source-based coverage: https://github.com/actions-rs/grcov/issues/105 | ||
# - uses: actions-rs/[email protected] | ||
# id: coverage | ||
|
@@ -210,3 +237,4 @@ jobs: | |
CARGO_TERM_VERBOSE: true | ||
RUSTFLAGS: "-Zinstrument-coverage" | ||
RUSTDOCFLAGS: "-Zinstrument-coverage" | ||
LLVM_PROFILE_FILE: "coverage-%p-%m.profraw" |
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