From e1aacaf9c2ca8dac2f95c9f26b265247db5820b9 Mon Sep 17 00:00:00 2001 From: TheresNoTime Date: Fri, 4 Sep 2026 11:07:28 +0100 Subject: [PATCH] Add github action to run tests --- .github/workflows/tests.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..eda6538 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,22 @@ +name: Tests + +on: + push: + branches: [master] + pull_request: + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v5 + + - name: Create env file + run: cp template.env .env + + # The default TEST_RUNNER (django-nose) does not work on Python 3.11, + # because nose uses collections.Callable. Use the Django test runner. + - name: Run tests + run: > + docker compose run --rm --build migrate + python manage.py test --noinput --testrunner=django.test.runner.DiscoverRunner