From 087513f891ef23c243ca488ee9c871ff6786ed6e Mon Sep 17 00:00:00 2001 From: MrFizzyBubbs <82386733+MrFizzyBubbs@users.noreply.github.com> Date: Tue, 10 Dec 2024 13:03:35 -0600 Subject: [PATCH] Add smoke_test --- .github/workflows/publish-to-test-pypi.yml | 4 ++-- tests/smoke_test.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 tests/smoke_test.py diff --git a/.github/workflows/publish-to-test-pypi.yml b/.github/workflows/publish-to-test-pypi.yml index f37852b..e0e2312 100644 --- a/.github/workflows/publish-to-test-pypi.yml +++ b/.github/workflows/publish-to-test-pypi.yml @@ -27,9 +27,9 @@ jobs: java-version-file: .java-version distribution: temurin - name: Smoke test (wheel) - run: uv run --isolated --no-project --with dist/*.whl -- python -c "import pymafia" + run: uv run --isolated --no-project --with dist/*.whl tests/smoke_test.py - name: Smoke test (source distribution) - run: uv run --isolated --no-project --with dist/*.tar.gz -- python -c "import pymafia" + run: uv run --isolated --no-project --with dist/*.tar.gz tests/smoke_test.py - name: Upload distributions uses: actions/upload-artifact@v4 with: diff --git a/tests/smoke_test.py b/tests/smoke_test.py new file mode 100644 index 0000000..732e4ad --- /dev/null +++ b/tests/smoke_test.py @@ -0,0 +1,4 @@ +from pymafia.kolmafia import km + +if not km.KoLmafia.permitsContinue(): + raise RuntimeError