From 0b8df9a8c4e90d65fbf65b2c4f103d81fff81c22 Mon Sep 17 00:00:00 2001 From: jharshman Date: Tue, 9 Jan 2024 21:18:37 +0000 Subject: [PATCH] Add github action workflow for PyTest --- .github/workflows/test.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2a38b1a --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +name: PyTest + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.12"] + + steps: + - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v3 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install pytest + if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Test with pytest + run: | + pytest +