Skip to content

Commit

Permalink
Add Rust unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhekhorn committed May 22, 2024
1 parent 86cf8a2 commit b0b170a
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 13 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/unittests-rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Rust unit tests

on:
push:
# TODO: remove branches
branches: ["*"]

jobs:
test-rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
# - name: Install and configure Poetry
# uses: snok/install-poetry@v1
- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Install task runner
run: pip install poethepoet
- name: Run Rust unit tests
run: |
# poetry install
poe rtest
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 b0b170a

Please sign in to comment.