Skip to content

Commit 5f10707

Browse files
committed
Run tests in pipeline
1 parent eb74a28 commit 5f10707

File tree

6 files changed

+104
-91
lines changed

6 files changed

+104
-91
lines changed

.github/workflows/CI.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,29 @@ permissions:
1919
contents: read
2020

2121
jobs:
22+
test:
23+
runs-on: ubuntu-latest
24+
strategy:
25+
matrix:
26+
python-version: ["3.10", "3.11", "3.12"]
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: actions/setup-python@v5
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
- name: Install dependencies
33+
run: |
34+
python -m pip install --upgrade pip
35+
pip install --upgrade poetry
36+
poetry install
37+
poetry run maturin develop
38+
- name: Run tests
39+
run: |
40+
poetry run pytest
41+
2242
linux:
2343
runs-on: ubuntu-latest
44+
needs: [test]
2445
strategy:
2546
matrix:
2647
target: [x86_64, x86, aarch64, armv7, s390x, ppc64le]
@@ -44,6 +65,7 @@ jobs:
4465

4566
windows:
4667
runs-on: windows-latest
68+
needs: [test]
4769
strategy:
4870
matrix:
4971
target: [x64, x86]
@@ -67,6 +89,7 @@ jobs:
6789

6890
macos:
6991
runs-on: macos-latest
92+
needs: [test]
7093
strategy:
7194
matrix:
7295
target: [x86_64, aarch64]
@@ -89,6 +112,7 @@ jobs:
89112

90113
sdist:
91114
runs-on: ubuntu-latest
115+
needs: [test]
92116
steps:
93117
- uses: actions/checkout@v4
94118
- name: Build sdist

Cargo.lock

Lines changed: 47 additions & 40 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
@@ -1,6 +1,6 @@
11
[package]
22
name = "quick-xmltodict"
3-
version = "0.1.1"
3+
version = "0.1.2"
44
edition = "2021"
55

66
[lib]

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ Efficient XML-to-dict conversion backed by Rust.
3636

3737
## Features
3838

39-
`quick-xmltodict` is a Rust-backed XML-to-dict conversion package that is designed to be fast and efficient.
39+
`quick-xmltodict` is a Rust-backed XML-to-dict conversion package designed to be fast and efficient.
4040
It has a single function, `parse`, that takes an XML string and returns a Python dictionary.
4141
You should be able to use this function as a drop-in replacement for the `xmltodict.parse` function from the original `xmltodict` package (used without any extra arguments).
4242
Like `xmltodict`, `quick-xmltodict` follows [this](https://www.xml.com/pub/a/2006/05/31/converting-between-xml-and-json.html) schema for converting XML to JSON.
@@ -45,8 +45,8 @@ Like `xmltodict`, `quick-xmltodict` follows [this](https://www.xml.com/pub/a/200
4545

4646
## Performance
4747

48-
`quick-xmltodict` is currently about 2-5 times faster than `xmltodict`.
49-
There are performance improvements to be made, so this difference is expected to increase.
48+
Since `xmltodict` uses the non-validating C-based [expat](https://docs.python.org/3/library/pyexpat.html) parser from Python's standard library, it is already very fast.
49+
`quick-xmltodict` is nonetheless about 2-5 times faster than `xmltodict`.
5050

5151
## Contributing
5252

@@ -65,11 +65,11 @@ poetry run pytest
6565
```
6666

6767
Be sure to run `poetry run maturin develop` after making changes to the Rust code.
68-
Add the `-r` flag for a release build (for example if you want to run benchmarks).
68+
Add the `-r` flag for a release build (for example, if you want to run benchmarks).
6969

7070
It's recommended to install the pre-commit hooks:
7171
```bash
7272
poetry run pre-commit install
7373
```
7474

75-
This ensures that linting and formatting is run automatically on every commit.
75+
This ensures that linting and formatting are run automatically on every commit.

0 commit comments

Comments
 (0)