Skip to content

Commit

Permalink
WIP github action
Browse files Browse the repository at this point in the history
  • Loading branch information
pamella committed May 16, 2024
1 parent 7039c8b commit fde5ab4
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 4 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: main

on: [push, pull_request]

jobs:
build:
name: Build

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
8 changes: 4 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
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
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
Expand Down

0 comments on commit fde5ab4

Please sign in to comment.