Skip to content

Commit

Permalink
test: Add "validate" to hugr CLI command. (#1331)
Browse files Browse the repository at this point in the history
And include rust code filter in criteria for running python tests on CI.
  • Loading branch information
cqc-alec authored Jul 22, 2024
1 parent 090b283 commit d8e6cf7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/change-filters.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Filters used by [dorny/path-filters](https://github.com/dorny/paths-filter)
# to detect changes in each subproject, and only run the corresponding jobs.

rust:
rust: &rust
- "hugr/**"
- "hugr-cli/**"
- "hugr-core/**"
Expand All @@ -11,6 +11,7 @@ rust:
- ".github/workflows/ci-rs.yml"

python:
- *rust
- "hugr-py/**"
- "pyproject.toml"
- "poetry.lock"
Expand Down
2 changes: 1 addition & 1 deletion hugr-py/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def validate(h: Hugr, mermaid: bool = False, roundtrip: bool = True):
workspace_dir = pathlib.Path(__file__).parent.parent.parent
# use the HUGR_BIN environment variable if set, otherwise use the debug build
bin_loc = os.environ.get("HUGR_BIN", str(workspace_dir / "target/debug/hugr"))
cmd = [bin_loc, "-"]
cmd = [bin_loc, "validate", "-"]

if mermaid:
cmd.append("--mermaid")
Expand Down

0 comments on commit d8e6cf7

Please sign in to comment.