Skip to content

Commit 2348778

Browse files
authored
Merge pull request #378 from NNPDF/rust-unittest
Add Rust unit tests to CI
2 parents 86cf8a2 + 2718121 commit 2348778

File tree

5 files changed

+23
-14
lines changed

5 files changed

+23
-14
lines changed

.github/workflows/unittests-rust.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Rust unit tests
2+
3+
on: push
4+
5+
jobs:
6+
test-rust:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-python@v5
11+
- name: Install task runner
12+
run: pip install poethepoet
13+
- name: Run Rust unit tests
14+
run: |
15+
poe rtest

.github/workflows/unittests.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: tests
1+
name: Python unit tests
22

33
on: push
44

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
</p>
44
<p align="center">
55
<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>
6+
<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>
67
<a href="https://eko.readthedocs.io/en/latest/?badge=latest"><img alt="Docs" src="https://readthedocs.org/projects/eko/badge/?version=latest"></a>
78
<a href="https://codecov.io/gh/NNPDF/eko"><img src="https://codecov.io/gh/NNPDF/eko/branch/master/graph/badge.svg" /></a>
89
<a href="https://www.codefactor.io/repository/github/nnpdf/eko"><img src="https://www.codefactor.io/repository/github/nnpdf/eko/badge" alt="CodeFactor" /></a>

pyproject.toml

+6
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,12 @@ asv-publish = "asv publish --config benchmarks/asv.conf.json"
124124
asv-show = "asv show --config benchmarks/asv.conf.json"
125125
asv-clean = { "shell" = "rm -rf benchmarks/env benchmarks/html benchmarks/results" }
126126
asv = ["asv-run", "asv-publish", "asv-preview"]
127+
compile = "pip install -e crates/eko/"
128+
rdocs.cmd = "cargo doc --workspace --manifest-path crates/Cargo.toml --no-deps"
129+
rdocs.env = { RUSTDOCFLAGS = "--html-in-header katex-header.html" }
130+
rdocs-view = "xdg-open crates/target/doc/ekors/index.html"
131+
rdocs-clean = "rm -rf crates/target/doc/"
132+
rtest = "cargo test --workspace --manifest-path crates/Cargo.toml"
127133

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

pyproject.toml.patch

-13
Original file line numberDiff line numberDiff line change
@@ -25,16 +25,3 @@ index 7404d871..a1e3ae66 100644
2525

2626
[tool.poetry]
2727
name = "eko"
28-
@@ -124,6 +138,12 @@ asv-publish = "asv publish --config benchmarks/asv.conf.json"
29-
asv-show = "asv show --config benchmarks/asv.conf.json"
30-
asv-clean = { "shell" = "rm -rf benchmarks/env benchmarks/html benchmarks/results" }
31-
asv = ["asv-run", "asv-publish", "asv-preview"]
32-
+compile = "pip install -e crates/eko/"
33-
+rdocs.cmd = "cargo doc --workspace --manifest-path crates/Cargo.toml --no-deps"
34-
+rdocs.env = { RUSTDOCFLAGS = "--html-in-header katex-header.html" }
35-
+rdocs-view = "xdg-open crates/target/doc/ekors/index.html"
36-
+rdocs-clean = "rm -rf crates/target/doc/"
37-
+rtest = "cargo test --workspace --manifest-path crates/Cargo.toml"
38-
39-
[tool.pytest.ini_options]
40-
testpaths = ['tests/', 'benchmarks/']

0 commit comments

Comments
 (0)