Skip to content

Commit da0e3b8

Browse files
Merge pull request #89 from codecov/th/support-python-3.14
feat: update pyo3 to support python 3.14
2 parents 09ea0e4 + 92589f1 commit da0e3b8

File tree

4 files changed

+87
-72
lines changed

4 files changed

+87
-72
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,45 +19,48 @@ jobs:
1919
run: make lint
2020

2121
run_tests:
22-
runs-on: ubuntu-latest
22+
strategy:
23+
matrix:
24+
os: [macos-latest, ubuntu-latest]
25+
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
26+
runs-on: ${{ matrix.os }}
2327
steps:
2428
- name: Checkout
2529
uses: actions/checkout@v4
2630
- uses: actions/setup-python@v4
2731
id: setup-python
2832
with:
29-
python-version: "3.11"
33+
python-version: ${{ matrix.python-version }}
3034
- name: Install Rust Toolchain
3135
run: rustup toolchain install stable --profile minimal --no-self-update
3236
- name: Install requirements
3337
run: |
3438
python -m venv venv
35-
. venv/bin/activate
39+
source venv/bin/activate
3640
pip install maturin
3741
pip install -r tests/requirements.txt
3842
maturin develop
39-
- name: Install codecov cli
40-
run: |
41-
pip install --no-cache-dir git+https://github.com/codecov/codecov-cli.git@joseph/test-results-staging
4243
- name: Run tests
4344
run: |
44-
. venv/bin/activate
45+
source venv/bin/activate
4546
python -m pytest --cov-report=xml:coverage.xml --cov=. --junitxml=unit.junit.xml
4647
4748
- name: Upload results to codecov
4849
if: ${{ !cancelled() }}
49-
uses: codecov/test-results-action@v1
50+
uses: codecov/codecov-action@v5
5051
with:
5152
token: ${{ secrets.CODECOV_ORG_TOKEN }}
5253
url: ${{ secrets.CODECOV_URL }}
53-
file: unit.junit.xml
54+
files: unit.junit.xml
5455
disable_search: true
56+
report_type: test-results
5557

56-
- name: Upload results to codecov
58+
- name: Upload results to codecov (Staging)
5759
if: ${{ !cancelled() }}
58-
uses: codecov/test-results-action@v1
60+
uses: codecov/codecov-action@v5
5961
with:
6062
token: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
6163
url: ${{ secrets.CODECOV_STAGING_API_URL }}
62-
file: unit.junit.xml
64+
files: unit.junit.xml
6365
disable_search: true
66+
report_type: test-results

Cargo.lock

Lines changed: 70 additions & 58 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ name = "test_results_parser"
99
crate-type = ["cdylib"]
1010

1111
[dependencies]
12-
pyo3 = "0.22.2"
12+
pyo3 = "0.27.1"
1313
quick-xml = "0.36.0"
1414
regex = "1.10.4"
1515
serde = { version = "1.0", features = ["derive"] }

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ pyo3::create_exception!(test_results_parser, ParserError, PyException);
1010
/// A Python module implemented in Rust.
1111
#[pymodule]
1212
fn test_results_parser(py: Python, m: &Bound<PyModule>) -> PyResult<()> {
13-
m.add("ParserError", py.get_type_bound::<ParserError>())?;
13+
m.add("ParserError", py.get_type::<ParserError>())?;
1414
m.add_class::<testrun::Testrun>()?;
1515
m.add_class::<testrun::Outcome>()?;
1616
m.add_class::<testrun::Framework>()?;

0 commit comments

Comments
 (0)