From e442a750c8306adb7dca0aec8e3565f23240dcce Mon Sep 17 00:00:00 2001 From: "Jonathan B. Coe" Date: Sun, 31 Mar 2024 15:53:36 +0100 Subject: [PATCH] Run unittest with python -m --- .github/workflows/python.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index c9f5242..75a8a54 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -20,13 +20,15 @@ jobs: uses: actions/setup-python@v4 with: python-version: ${{ matrix.python }} - - name: Install dependencies + - name: Install virtual env and dependencies run: | python -m pip install --upgrade pip + python -m venv .venv + source ./.venv/bin/activate pip install -r requirements.txt - name: Type checks run: | - mypy *.py --check-untyped-defs + python -m mypy *.py --check-untyped-defs - name: Tests run: | - unittest discover . + python -m unittest discover .