Skip to content

Commit

Permalink
Merge pull request #378 from NNPDF/rust-unittest
Browse files Browse the repository at this point in the history
Add Rust unit tests to CI
  • Loading branch information
felixhekhorn authored May 22, 2024
2 parents 86cf8a2 + 2718121 commit 2348778
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 14 deletions.
15 changes: 15 additions & 0 deletions .github/workflows/unittests-rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Rust unit tests

on: push

jobs:
test-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
- name: Install task runner
run: pip install poethepoet
- name: Run Rust unit tests
run: |
poe rtest
2 changes: 1 addition & 1 deletion .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: tests
name: Python unit tests

on: push

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
</p>
<p align="center">
<a href="https://github.com/N3PDF/eko/actions/workflows/unittests.yml"><img alt="Tests" src="https://github.com/N3PDF/eko/actions/workflows/unittests.yml/badge.svg" /></a>
<a href="https://github.com/N3PDF/eko/actions/workflows/unittests-rust.yml"><img alt="Rust tests" src="https://github.com/N3PDF/eko/actions/workflows/unittests-rust.yml/badge.svg" /></a>
<a href="https://eko.readthedocs.io/en/latest/?badge=latest"><img alt="Docs" src="https://readthedocs.org/projects/eko/badge/?version=latest"></a>
<a href="https://codecov.io/gh/NNPDF/eko"><img src="https://codecov.io/gh/NNPDF/eko/branch/master/graph/badge.svg" /></a>
<a href="https://www.codefactor.io/repository/github/nnpdf/eko"><img src="https://www.codefactor.io/repository/github/nnpdf/eko/badge" alt="CodeFactor" /></a>
Expand Down
6 changes: 6 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,12 @@ asv-publish = "asv publish --config benchmarks/asv.conf.json"
asv-show = "asv show --config benchmarks/asv.conf.json"
asv-clean = { "shell" = "rm -rf benchmarks/env benchmarks/html benchmarks/results" }
asv = ["asv-run", "asv-publish", "asv-preview"]
compile = "pip install -e crates/eko/"
rdocs.cmd = "cargo doc --workspace --manifest-path crates/Cargo.toml --no-deps"
rdocs.env = { RUSTDOCFLAGS = "--html-in-header katex-header.html" }
rdocs-view = "xdg-open crates/target/doc/ekors/index.html"
rdocs-clean = "rm -rf crates/target/doc/"
rtest = "cargo test --workspace --manifest-path crates/Cargo.toml"

[tool.pytest.ini_options]
testpaths = ['tests/', 'benchmarks/']
Expand Down
13 changes: 0 additions & 13 deletions pyproject.toml.patch
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,3 @@ index 7404d871..a1e3ae66 100644

[tool.poetry]
name = "eko"
@@ -124,6 +138,12 @@ asv-publish = "asv publish --config benchmarks/asv.conf.json"
asv-show = "asv show --config benchmarks/asv.conf.json"
asv-clean = { "shell" = "rm -rf benchmarks/env benchmarks/html benchmarks/results" }
asv = ["asv-run", "asv-publish", "asv-preview"]
+compile = "pip install -e crates/eko/"
+rdocs.cmd = "cargo doc --workspace --manifest-path crates/Cargo.toml --no-deps"
+rdocs.env = { RUSTDOCFLAGS = "--html-in-header katex-header.html" }
+rdocs-view = "xdg-open crates/target/doc/ekors/index.html"
+rdocs-clean = "rm -rf crates/target/doc/"
+rtest = "cargo test --workspace --manifest-path crates/Cargo.toml"

[tool.pytest.ini_options]
testpaths = ['tests/', 'benchmarks/']

0 comments on commit 2348778

Please sign in to comment.