From b8b877998b4d517a417aa308a714db86bfe9221c Mon Sep 17 00:00:00 2001 From: wim glenn Date: Tue, 14 Nov 2023 19:39:07 -0600 Subject: [PATCH] test on Python 3.12 --- .github/workflows/main.yml | 43 +++++++++++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c3a7688..2231025 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -9,25 +9,48 @@ on: jobs: tests: - name: "Python ${{ matrix.python-version }}" - runs-on: "ubuntu-latest" + name: Python ${{ matrix.python-version }} + runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] - + python-version: + - "3.7" + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" steps: - - uses: "actions/checkout@v3" - - uses: "actions/setup-python@v4" + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: - python-version: "${{ matrix.python-version }}" - - name: "Install dependencies" + python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + set -xe + pip install ".[dev]" + + - name: Run tests for ${{ matrix.python-version }} + run: python -m pytest --cov=drf_queryfields + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@main + + tests-27: + name: Python 2.7 on ubuntu-20.04 + runs-on: ubuntu-20.04 + container: + image: python:2.7-buster + steps: + - uses: actions/checkout@v3 + - name: Install dependencies run: | set -xe pip install ".[dev]" - - name: "Run tests for ${{ matrix.python-version }}" + - name: Run tests for Python 2.7 on Ubuntu 20.04 run: python -m pytest --cov=drf_queryfields - name: Upload coverage to Codecov - uses: "codecov/codecov-action@v3" + uses: codecov/codecov-action@main