Skip to content

Commit

Permalink
ci: test python bindings (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
notmgsk authored Sep 22, 2022
1 parent c37c4b9 commit f597704
Show file tree
Hide file tree
Showing 6 changed files with 561 additions and 16 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ jobs:
with:
command: install
args: --debug cargo-make
- name: Run CI
- name: Install poetry
uses: snok/install-poetry@v1
- name: Run Rust CI
uses: actions-rs/cargo@v1
env:
CARGO_MAKE_RUN_CHECK_FORMAT: true
Expand All @@ -27,3 +29,8 @@ jobs:
with:
command: make
args: --cwd crates/lib --makefile Makefile.toml ci-flow
- name: Run Python CI
uses: actions-rs/cargo@v1
with:
command: make
args: --cwd crates/python --makefile Makefile.toml pytest-flow
31 changes: 31 additions & 0 deletions crates/python/Makefile.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
[env]
RUST_BACKTRACE = 0

[tasks.pre-test-docker-up]
command = "docker-compose"
args = ["up", "-d"]

[tasks.pre-test-poetry-install]
command = "poetry"
args = ["install"]

[tasks.pre-test-install-lib]
command = "poetry"
args = ["run", "maturin", "develop"]

[tasks.post-test]
command = "docker-compose"
args = ["down"]

[tasks.test]
command = "poetry"
args = ["run", "pytest", "tests"]

[tasks.pytest-flow]
dependencies = [
"pre-test-docker-up",
"pre-test-poetry-install",
"pre-test-install-lib",
"test",
"post-test",
]
302 changes: 287 additions & 15 deletions crates/python/poetry.lock

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

3 changes: 3 additions & 0 deletions crates/python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ python = "^3.7"

[tool.poetry.dev-dependencies]
maturin = "^0.13.2"
pytest = "^7.1.3"
pytest-asyncio = "^0.19.0"
black = "^22.8.0"

[build-system]
requires = ["maturin>=0.13,<0.14"]
Expand Down
Loading

0 comments on commit f597704

Please sign in to comment.