From 7288c88efb6c66dfccb4eb0a73737efff2cb52a5 Mon Sep 17 00:00:00 2001 From: Matt Layman Date: Wed, 16 Jul 2025 21:30:08 -0400 Subject: [PATCH 1/5] Allow pull requests for CI. --- .github/workflows/tests.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fc1efa1..0971710 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,12 @@ name: Python package -on: [push, pull_request] +on: + push: + branches: + - main + tags: + - '**' + pull_request: jobs: build: From 1214d1b49db01373f2f612d8a7fe5af1547cd60d Mon Sep 17 00:00:00 2001 From: Matt Layman Date: Wed, 16 Jul 2025 21:34:07 -0400 Subject: [PATCH 2/5] Try Python 3.12 for the extra tests. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0971710..d4e9fe8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,7 +42,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.13' + python-version: '3.12' - name: Install tox and any other packages run: pip install tox From b7d530635b15c374b8cda2c666a15f0a5806568d Mon Sep 17 00:00:00 2001 From: Matt Layman Date: Wed, 16 Jul 2025 21:48:12 -0400 Subject: [PATCH 3/5] Try using changedir. --- tox.ini | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 493b398..24260e1 100644 --- a/tox.ini +++ b/tox.ini @@ -21,8 +21,9 @@ deps = pytest pytest-tap commands = - pytest --tap-files --tap-outdir=results {envsitepackagesdir}/tap + pytest --tap-files --tap-outdir=results tappy results +changedir = {envsitepackagesdir}/tap [testenv:coverage] setenv = From fbfec708472fb514e8dcf425e800c7c0658f8f1f Mon Sep 17 00:00:00 2001 From: Matt Layman Date: Wed, 16 Jul 2025 22:05:33 -0400 Subject: [PATCH 4/5] Simplify the integration test by fixing the test input data. --- testresults.tap_example | 29 +++++++++++++++++++++++++++++ tox.ini | 7 +------ 2 files changed, 30 insertions(+), 6 deletions(-) create mode 100644 testresults.tap_example diff --git a/testresults.tap_example b/testresults.tap_example new file mode 100644 index 0000000..371bce8 --- /dev/null +++ b/testresults.tap_example @@ -0,0 +1,29 @@ +1..21 +# TAP results for homeschool/accounts/tests/test_forms.py +ok 1 homeschool/accounts/tests/test_forms.py::TestSigninForm.test_create_user +ok 2 homeschool/accounts/tests/test_forms.py::TestSigninForm.test_existing_user +ok 3 homeschool/accounts/tests/test_forms.py::TestSigninForm.test_invalid_email +# TAP results for homeschool/accounts/tests/test_middleware.py +ok 4 homeschool/accounts/tests/test_middleware.py::TestAccountGateMiddleware.test_allow_list +ok 5 homeschool/accounts/tests/test_middleware.py::TestAccountGateMiddleware.test_allow_list_resolves +ok 6 homeschool/accounts/tests/test_middleware.py::TestAccountGateMiddleware.test_anonymous_user +ok 7 homeschool/accounts/tests/test_middleware.py::TestAccountGateMiddleware.test_inactive_redirect +ok 8 homeschool/accounts/tests/test_middleware.py::TestAccountGateMiddleware.test_no_gate_url_redirect +ok 9 homeschool/accounts/tests/test_middleware.py::TestAccountGateMiddleware.test_request_has_account +# TAP results for homeschool/accounts/tests/test_models.py +ok 10 homeschool/accounts/tests/test_models.py::TestAccount.test_email +ok 11 homeschool/accounts/tests/test_models.py::TestAccount.test_factory +ok 12 homeschool/accounts/tests/test_models.py::TestAccount.test_trial_end +# TAP results for homeschool/accounts/tests/test_stripe_gateway.py +ok 13 homeschool/accounts/tests/test_stripe_gateway.py::TestStripeGateway.test_creates_billing_portal_session +ok 14 homeschool/accounts/tests/test_stripe_gateway.py::TestStripeGateway.test_creates_session +ok 15 homeschool/accounts/tests/test_stripe_gateway.py::TestStripeGateway.test_no_trial_in_stripe_limits +# TAP results for homeschool/accounts/tests/test_stripe_webhooks.py +ok 16 homeschool/accounts/tests/test_stripe_webhooks.py::TestHandleCheckoutSessionCompleted.test_account_active +# TAP results for homeschool/accounts/tests/test_tasks.py +ok 17 homeschool/accounts/tests/test_tasks.py::TestExpireTrials.test_expires_trials +ok 18 homeschool/accounts/tests/test_tasks.py::TestExpireTrials.test_keep_active_trials +ok 19 homeschool/accounts/tests/test_tasks.py::TestExpireTrials.test_other_statuses_not_expired +# TAP results for homeschool/accounts/tests/test_templatetags.py +ok 20 homeschool/accounts/tests/test_templatetags.py::TestTrialBanner.test_display_banner +ok 21 homeschool/accounts/tests/test_templatetags.py::TestTrialBanner.test_non_trialing diff --git a/tox.ini b/tox.ini index 24260e1..39e8675 100644 --- a/tox.ini +++ b/tox.ini @@ -17,13 +17,8 @@ commands = python -m tap changedir = src [testenv:integration] -deps = - pytest - pytest-tap commands = - pytest --tap-files --tap-outdir=results - tappy results -changedir = {envsitepackagesdir}/tap + tappy testresults.tap_example [testenv:coverage] setenv = From dbb3fb867fb04e92f324a3ef58f8b905c16a4ab3 Mon Sep 17 00:00:00 2001 From: Matt Layman Date: Wed, 16 Jul 2025 22:08:08 -0400 Subject: [PATCH 5/5] Restore extra tests to 3.13. --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d4e9fe8..0971710 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -42,7 +42,7 @@ jobs: - name: Setup Python uses: actions/setup-python@v5 with: - python-version: '3.12' + python-version: '3.13' - name: Install tox and any other packages run: pip install tox