From a495051d778b7b5afa6aa9624e4e106c06838c9a Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Wed, 23 Jul 2025 16:02:05 -0700 Subject: [PATCH 1/2] added pytest action --- .github/workflows/pytest.yaml | 39 +++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/pytest.yaml diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml new file mode 100644 index 0000000..7f3a2a5 --- /dev/null +++ b/.github/workflows/pytest.yaml @@ -0,0 +1,39 @@ +name: Run Tests on PR + +on: + pull_request: + branches: [main] + +jobs: + test: + runs-on: ubuntu-latest + + strategy: + matrix: + python-version: [3.9, 3.10] + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Cache pip dependencies + uses: actions/cache@v3 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: | + ${{ runner.os }}-pip- + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + + - name: Run tests with pytest + run: | + pytest --verbose --tb=short \ No newline at end of file From bcc149ac63d5a37cae2b312bcc7a11a85f181f3f Mon Sep 17 00:00:00 2001 From: Colin Harrison Date: Wed, 23 Jul 2025 16:08:56 -0700 Subject: [PATCH 2/2] fix typo --- .github/workflows/pytest.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pytest.yaml b/.github/workflows/pytest.yaml index 7f3a2a5..7ee9c26 100644 --- a/.github/workflows/pytest.yaml +++ b/.github/workflows/pytest.yaml @@ -10,7 +10,7 @@ jobs: strategy: matrix: - python-version: [3.9, 3.10] + python-version: ["3.9", "3.10"] steps: - uses: actions/checkout@v4