From 1752e47a653cfd7093dfe79321a520bb30837559 Mon Sep 17 00:00:00 2001 From: "David M. Hollenstein" Date: Fri, 20 Sep 2024 11:39:19 +0200 Subject: [PATCH] chore: Add GitHub actions workflow for running pytest --- .github/workflows/run-pytest.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/run-pytest.yml diff --git a/.github/workflows/run-pytest.yml b/.github/workflows/run-pytest.yml new file mode 100644 index 0000000..6bb9cee --- /dev/null +++ b/.github/workflows/run-pytest.yml @@ -0,0 +1,30 @@ +# This workflow will install the xlsxreport package and its dependencies and run pytest with a variety of Python versions +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python + +name: Run pytest +on: + push: + branches: ["main", "develop", "test-ci"] + pull_request: + +jobs: + build: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.9", "3.10", "3.11", "3.12"] + + steps: + - uses: actions/checkout@v4.1.2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5.1.0 + with: + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install .[tests] + - name: Test with pytest + run: | + python -m pytest