Switch from Travis CI to GitHub Actions

master
Michael Käufl 2021-12-16 12:51:11 +01:00
parent aaaa92ba37
commit 3ae816d64d
No known key found for this signature in database
GPG Key ID: 30274591B981122A
2 changed files with 42 additions and 24 deletions

42
.github/workflows/tests.yml vendored 100644
View File

@ -0,0 +1,42 @@
---
name: Tests
on:
push:
branches:
- develop
- master
pull_request:
jobs:
tests:
name: Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
django-version:
- "2.2.17" # first version to support Python 3.9
- "3.1.3" # first version to support Python 3.9
- "3.2.0"
steps:
- uses: actions/checkout@v2
- 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 wheel setuptools
python -m pip install --upgrade "django~=${{ matrix.django-version}}"
- name: Run tests
run: python manage.py test
working-directory: sample_project

View File

@ -1,24 +0,0 @@
arch:
- amd64
- ppc64le
language: python
python:
- "3.6"
- "3.7"
- "3.8"
- "3.9"
env:
- DJANGO_VERSION=2.2 SAMPLE_PROJECT=sample_project
- DJANGO_VERSION=3.1 SAMPLE_PROJECT=sample_project
- DJANGO_VERSION=3.2 SAMPLE_PROJECT=sample_project
branches:
only:
- develop
install:
- pip install django==$DJANGO_VERSION
script:
- cd $SAMPLE_PROJECT
- python manage.py test