From 9e48eb6868b64eb30bfd5e5cef65c071a2468522 Mon Sep 17 00:00:00 2001 From: Matthew Miller Date: Wed, 4 Dec 2024 11:39:14 -0800 Subject: [PATCH] Add action to run tests --- .github/workflows/unit_test.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/unit_test.yml diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml new file mode 100644 index 0000000..0a76dea --- /dev/null +++ b/.github/workflows/unit_test.yml @@ -0,0 +1,32 @@ +name: Run Unit Tests + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + matrix: + python-version: ['3.10'] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pipenv + pipenv install --deploy --dev + - name: Test with unittest + run: | + python _app/manage.py test homepage.tests + - name: Run mypy + run: | + python -m mypy _app/homepage