Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 15 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,45 +19,48 @@ jobs:
run: make lint

run_tests:
runs-on: ubuntu-latest
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
python-version: ['3.10', '3.11', '3.12', '3.13', '3.14']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-python@v4
id: setup-python
with:
python-version: "3.11"
python-version: ${{ matrix.python-version }}
- name: Install Rust Toolchain
run: rustup toolchain install stable --profile minimal --no-self-update
- name: Install requirements
run: |
python -m venv venv
. venv/bin/activate
source venv/bin/activate
pip install maturin
pip install -r tests/requirements.txt
maturin develop
- name: Install codecov cli
run: |
pip install --no-cache-dir git+https://github.com/codecov/codecov-cli.git@joseph/test-results-staging
- name: Run tests
run: |
. venv/bin/activate
source venv/bin/activate
python -m pytest --cov-report=xml:coverage.xml --cov=. --junitxml=unit.junit.xml

- name: Upload results to codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_ORG_TOKEN }}
url: ${{ secrets.CODECOV_URL }}
file: unit.junit.xml
files: unit.junit.xml
disable_search: true
report_type: test-results

- name: Upload results to codecov
- name: Upload results to codecov (Staging)
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_ORG_TOKEN_STAGING }}
url: ${{ secrets.CODECOV_STAGING_API_URL }}
file: unit.junit.xml
files: unit.junit.xml
disable_search: true
report_type: test-results
128 changes: 70 additions & 58 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ name = "test_results_parser"
crate-type = ["cdylib"]

[dependencies]
pyo3 = "0.22.2"
pyo3 = "0.27.1"
quick-xml = "0.36.0"
regex = "1.10.4"
serde = { version = "1.0", features = ["derive"] }
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pyo3::create_exception!(test_results_parser, ParserError, PyException);
/// A Python module implemented in Rust.
#[pymodule]
fn test_results_parser(py: Python, m: &Bound<PyModule>) -> PyResult<()> {
m.add("ParserError", py.get_type_bound::<ParserError>())?;
m.add("ParserError", py.get_type::<ParserError>())?;
m.add_class::<testrun::Testrun>()?;
m.add_class::<testrun::Outcome>()?;
m.add_class::<testrun::Framework>()?;
Expand Down