Skip to content

Commit

Permalink
ci: move from travis to github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
xrmx authored and davedash committed Oct 26, 2023
1 parent 46c52d1 commit 44ee98d
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 30 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: linting

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
python -m pip install pep8
- name: Run pep8
run: |
pep8 fixture_magic --max-line-length=120
53 changes: 53 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Python tests

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-22.04
strategy:
matrix:
include:
- python-version: "3.7"
django-version: "3.2"
- python-version: "3.9"
django-version: "3.2"
- python-version: "3.9"
django-version: "3.2"
- python-version: "3.10"
django-version: "3.2"
- python-version: "3.9"
django-version: "4.0"
- python-version: "3.10"
django-version: "4.0"
- python-version: "3.9"
django-version: "4.1"
- python-version: "3.10"
django-version: "4.1"
- python-version: "3.11"
django-version: "4.1"
- python-version: "3.9"
django-version: "4.2"
- python-version: "3.10"
django-version: "4.2"
- python-version: "3.11"
django-version: "4.2"

steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
python -m pip install --upgrade pip tox
- name: Run Tests
env:
TOXENV: py${{ matrix.python-version }}-django${{ matrix.django-version }}
run: tox
14 changes: 0 additions & 14 deletions .travis.yml

This file was deleted.

24 changes: 8 additions & 16 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
[tox]
envlist = py{37,38,39,310}-django{32}
py{39,310}-django{40}
py{39,310,311}-django{41}
py{39,310,311}-django{42}
envlist = py{3.7,3.8,3.9,3.10}-django{3.2}
py{3.9,3.10}-django{4.0}
py{3.9,3.10,3.11}-django{4.1}
py{3.9,3.10,3.11}-django{4.2}

[travis]
python =
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312

[testenv]
setenv =
Expand All @@ -27,7 +19,7 @@ allowlist_externals =

deps =
coverage
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
django41: Django>=4.1,<4.2
django42: Django>=4.2,<5.0
django3.2: Django>=3.2,<4.0
django4.0: Django>=4.0,<4.1
django4.1: Django>=4.1,<4.2
django4.2: Django>=4.2,<5.0

0 comments on commit 44ee98d

Please sign in to comment.