Skip to content

Commit b0444d4

Browse files
committed
chore: move cli tests to hatch environment
Signed-off-by: SequeI <asiek@redhat.com>
1 parent 8d45971 commit b0444d4

2 files changed

Lines changed: 18 additions & 6 deletions

File tree

.github/workflows/cli.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,13 @@ defaults:
3131
jobs:
3232
model-signing-cli-test:
3333
runs-on: ubuntu-24.04
34+
permissions:
35+
contents: read
3436
steps:
3537
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
38+
with:
39+
persist-credentials: false
40+
- name: Set up Hatch
41+
uses: pypa/hatch@257e27e51a6a5616ed08a39a408a21c35c9931bc # install
3642
- name: Run CLI tests
37-
run: |
38-
# TODO: this should use hatch
39-
python -m venv venv
40-
. venv/bin/activate
41-
pip install -e .[pkcs11]
42-
./scripts/tests/testrunner
43+
run: hatch run cli:test

pyproject.toml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,17 @@ python = "3.12"
142142
[tool.hatch.envs.type.scripts]
143143
check = "pytype -k -j auto src tests benchmarks"
144144

145+
[tool.hatch.envs.cli]
146+
description = """Custom environment for CLI tests.
147+
Use `hatch run cli:test` to run CLI tests.
148+
"""
149+
features = [
150+
"pkcs11",
151+
]
152+
153+
[tool.hatch.envs.cli.scripts]
154+
test = "bash ./scripts/tests/testrunner"
155+
145156
[tool.coverage.report]
146157
exclude_also = [
147158
"pass",

0 commit comments

Comments
 (0)