Skip to content

Commit

Permalink
Merge pull request #63 from codecov/joseph/parse-raw-upload
Browse files Browse the repository at this point in the history
feat: add parse_raw_upload
  • Loading branch information
joseph-sentry authored Jan 8, 2025
2 parents 0a663e5 + d3a4509 commit cc76ca7
Show file tree
Hide file tree
Showing 29 changed files with 918 additions and 598 deletions.
121 changes: 116 additions & 5 deletions Cargo.lock

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

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@ indexmap = "2.6.0"
pyo3 = { version = "0.23.3", features = ["abi3-py312", "anyhow"] }
quick-xml = "0.37.1"
regex = "1.11.1"
rinja = "0.3.5"
serde = { version = "1.0.215", features = ["derive"] }
serde_json = "1.0.133"
rinja = "0.3.5"
base64 = "0.22.1"
flate2 = "1.0.35"
smallvec = "2.0.0-alpha.7"
thiserror = "2.0.3"
watto = { git = "https://github.com/getsentry/watto", features = [
Expand All @@ -28,10 +30,12 @@ watto = { git = "https://github.com/getsentry/watto", features = [
[dev-dependencies]
criterion = { version = "2.7.2", package = "codspeed-criterion-compat" }
rand = { version = "0.8.5", features = ["small_rng"] }
insta = { version = "1.42.0", features = ["glob", "yaml"] }

[profile.release]
debug = 1


[[bench]]
name = "binary"
harness = false
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,15 @@ The CI uses the maturin-action to build wheels and an sdist

The version of the wheels built are determined by the value of the version in the cargo.toml

There are 2 parsing function currently implemented:

There are 2 parsing functions currently implemented:

- `parse_junit_xml`: this parses `junit.xml` files
- `parse_pytest_reportlog`: this parses files produced by the `pytest-reportlog` extension

Both these functions take the path to the file to parse as an arg and return a list of `Testrun` objects.
This function takes the path to the file to parse as an arg and returns a list of `Testrun` objects.

The `Testrun` objects look like this:

```
Outcome:
Pass,
Expand All @@ -33,4 +34,8 @@ Testrun:
outcome: Outcome
duration: float
testsuite: str
```
```

- `parse_raw_upload`: this parses an entire raw test results upload

this function takes in the raw upload bytes and returns a message packed list of Testrun objects
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ dev-dependencies = [
"pytest-cov>=6.0.0",
"pytest-reportlog>=0.4.0",
"maturin>=1.7.4",
"pytest-insta>=0.3.0",
]
Loading

0 comments on commit cc76ca7

Please sign in to comment.