forked from viewflow/django-fsm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add github actions test workflow (#1)
* add github actions test workflow * switch to tox-gh-actions
- Loading branch information
1 parent
9d7f42e
commit 52785f0
Showing
5 changed files
with
78 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: github-actions | ||
directory: "/" | ||
schedule: | ||
interval: weekly | ||
timezone: America/Chicago | ||
labels: | ||
- dependabot | ||
groups: | ||
gha: | ||
patterns: | ||
- "*" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: test | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
pull_request: | ||
|
||
concurrency: | ||
group: test-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
PYTHONUNBUFFERED: "1" | ||
FORCE_COLOR: "1" | ||
|
||
jobs: | ||
test: | ||
name: Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
django-version: ["4.2", "5.0"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
persist-credentials: false | ||
|
||
- uses: westerveltco/setup-ci-action@v0 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
extra-python-dependencies: tox,tox-gh-actions | ||
use-uv: true | ||
|
||
- name: Run test suite | ||
run: tox -v | ||
env: | ||
DJANGO: ${{ matrix.django-version }} | ||
|
||
tests: | ||
runs-on: ubuntu-latest | ||
needs: test | ||
if: always() | ||
steps: | ||
- name: OK | ||
if: ${{ !(contains(needs.*.result, 'failure')) }} | ||
run: exit 0 | ||
- name: Fail | ||
if: ${{ contains(needs.*.result, 'failure') }} | ||
run: exit 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ dist/ | |
build/ | ||
django_fsm.egg-info/ | ||
.tox/ | ||
.venv | ||
.mise*.toml | ||
!.mise.toml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[env] | ||
_.python.venv = { path = ".venv", create = true } | ||
|
||
[tools] | ||
python = ["3.12", "3.11", "3.10", "3.9", "3.8"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,87 +1,19 @@ | ||
[tox] | ||
envlist = | ||
# py26-dj{16} | ||
py27-dj{16,18,19,110,111} | ||
# py33-dj{16,18} | ||
py{34,35,36}-dj{18,19,110,111} | ||
py{36,37}-dj{20,21} | ||
py{37,38}-dj{22,30,31,32} | ||
py{38,310}-dj{40,41} | ||
py{310}-dj{42,50} | ||
py{38,39}-dj42 | ||
py{310,311,312}-dj{42,50} | ||
skipsdist = True | ||
|
||
[testenv] | ||
deps = | ||
py26: ipython==2.1.0 | ||
{py27,py32,py33}: ipython==5.4.1 | ||
{py34,py35,py36}: ipython==6.1.0 | ||
{py37}: ipython==7.4.0 | ||
|
||
dj16: Django==1.6.11 | ||
dj16: coverage<=3.999 | ||
dj16: django-guardian==1.3.2 | ||
|
||
dj18: Django==1.8.19 | ||
dj18: coverage==4.1 | ||
dj18: django-guardian==1.4.4 | ||
|
||
dj19: Django==1.9.13 | ||
dj19: coverage==4.1 | ||
dj19: django-guardian==1.4.4 | ||
|
||
dj110: Django==1.10.8 | ||
dj110: coverage==4.1 | ||
dj110: django-guardian==1.4.4 | ||
|
||
dj111: Django==1.11.26 | ||
dj111: coverage==4.5.4 | ||
dj111: django-guardian==1.4.8 | ||
|
||
dj20: Django==2.0.13 | ||
dj20: coverage==4.5.4 | ||
dj20: django-guardian==1.5.0 | ||
|
||
dj21: Django==2.1.15 | ||
dj21: coverage==4.5.4 | ||
dj21: django-guardian==1.5.0 | ||
|
||
dj22: Django==2.2.24 | ||
dj22: coverage==4.5.4 | ||
dj22: django-guardian==2.1.0 | ||
|
||
dj30: Django==3.0.14 | ||
dj30: coverage==4.5.4 | ||
dj30: django-guardian==2.1.0 | ||
|
||
dj31: Django==3.1.13 | ||
dj31: coverage==5.5 | ||
dj31: django-guardian==2.3.0 | ||
|
||
dj32: Django==3.2.9 | ||
dj32: coverage==6.1.1 | ||
dj32: django-guardian==2.4.0 | ||
|
||
dj40: Django==4.0.7 | ||
dj40: coverage==6.4.2 | ||
dj40: django-guardian==2.4.0 | ||
|
||
dj41: Django==4.1 | ||
dj41: coverage==6.4.3 | ||
dj41: django-guardian==2.4.0 | ||
|
||
dj42: Django==4.2.8 | ||
dj42: coverage==7.3.4 | ||
dj42: django-guardian==2.4.0 | ||
|
||
dj50: Django==5.0 | ||
dj50: coverage==7.3.4 | ||
dj50: django-guardian==2.4.0 | ||
|
||
dj42: Django>=4.2,<4.3 | ||
dj50: Django>=5.0,<5.1 | ||
coverage==7.3.4 | ||
django-guardian==2.4.0 | ||
graphviz==0.7.1 | ||
pep8==1.7.1 | ||
pyflakes==1.6.0 | ||
commands = {posargs:python ./tests/manage.py test} | ||
|
||
|
||
[flake8] | ||
max-line-length = 130 |