diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..3140ffe --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,35 @@ +name: main + +on: [push, pull_request] + +jobs: + build: + name: Build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}) + + runs-on: ubuntu-latest + + strategy: + matrix: + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + django-version: ["4.2", "5.0"] + exclude: + - python-version: "3.8" + django-version: "5.0" + - python-version: "3.9" + django-version: "5.0" + + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Set TOXENV + run: echo "TOXENV=py$(echo ${{ matrix.python-version }} | tr -d '.')-django$(echo ${{ matrix.django-version }} | tr -d '.')" >> $GITHUB_ENV + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -r requirements_test.txt + - name: Test with tox + run: tox -- --keepdb --parallel diff --git a/tox.ini b/tox.ini index d243cde..7b06717 100644 --- a/tox.ini +++ b/tox.ini @@ -2,8 +2,8 @@ requires = tox>=4 envlist = - {py38,py39,py310,py311,py312}-django-42 - {py310,py311,py312}-django-50 + {py38,py39,py310,py311,py312}-django42 + {py310,py311,py312}-django50 [testenv] description = run tests @@ -11,8 +11,8 @@ setenv = PYTHONPATH = {toxinidir}:{toxinidir}/celerybeat_status:{toxinidir} commands = coverage run --source celerybeat_status runtests.py {posargs} deps = - django-42: Django>=4.2,<5 - django-50: Django>=5.0,<5.1 + django42: Django>=4.2,<5 + django50: Django>=5.0,<5.1 -r{toxinidir}/requirements_test.txt basepython = py312: python3.12