Move to github actions
This commit is contained in:
committed by
Sébastien Corbin
parent
ea3800375c
commit
63c3d7d2dc
66
.github/workflows/actions.yml
vendored
Normal file
66
.github/workflows/actions.yml
vendored
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
name: Run Tests
|
||||||
|
|
||||||
|
on: [ push, pull_request ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
django_version:
|
||||||
|
- '2.2'
|
||||||
|
- '3.2'
|
||||||
|
- '4.0'
|
||||||
|
python_version:
|
||||||
|
- 3.6
|
||||||
|
- 3.7
|
||||||
|
- 3.8
|
||||||
|
- 3.9
|
||||||
|
- "3.10"
|
||||||
|
exclude:
|
||||||
|
- django_version: '2.2'
|
||||||
|
python_version: '3.10'
|
||||||
|
|
||||||
|
- django_version: '4.0'
|
||||||
|
python_version: '3.6'
|
||||||
|
|
||||||
|
- django_version: '4.0'
|
||||||
|
python_version: '3.7'
|
||||||
|
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
|
- name: Set up Python ${{ matrix.python_version }}
|
||||||
|
uses: actions/setup-python@v2
|
||||||
|
with:
|
||||||
|
python_version: ${{ matrix.python_version }}
|
||||||
|
|
||||||
|
- name: Cache pip
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
# This path is specific to Ubuntu
|
||||||
|
path: ~/.cache/pip
|
||||||
|
key: ${{ runner.os }}-pip-${{ matrix.python_version }}-${{ matrix.django_version }}
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: |
|
||||||
|
python -m pip install --upgrade pip
|
||||||
|
pip install -e .
|
||||||
|
pip install -U flake8 coveralls argparse
|
||||||
|
pip install -U Django~=${{ matrix.django_version }}
|
||||||
|
|
||||||
|
- name: Lint with flake8
|
||||||
|
run: flake8 --ignore=E501,W504 jsignature
|
||||||
|
|
||||||
|
- name: Test Django
|
||||||
|
run: |
|
||||||
|
python -W error::DeprecationWarning -W error::PendingDeprecationWarning \
|
||||||
|
-m coverage run runtests.py
|
||||||
|
|
||||||
|
- name: Coverage
|
||||||
|
if: ${{ success() }}
|
||||||
|
run: |
|
||||||
|
coveralls --service=github
|
||||||
46
.travis.yml
46
.travis.yml
@@ -1,46 +0,0 @@
|
|||||||
language: python
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
fast_finish: true
|
|
||||||
allow_failures:
|
|
||||||
- env: DJANGO=master
|
|
||||||
include:
|
|
||||||
- python: 2.7
|
|
||||||
env: DJANGO=1.11
|
|
||||||
|
|
||||||
- python: 3.5
|
|
||||||
env: DJANGO=1.11
|
|
||||||
- python: 3.5
|
|
||||||
env: DJANGO=2.2
|
|
||||||
|
|
||||||
- python: 3.6
|
|
||||||
env: DJANGO=1.11
|
|
||||||
- python: 3.6
|
|
||||||
env: DJANGO=2.2
|
|
||||||
- python: 3.6
|
|
||||||
env: DJANGO=3.0
|
|
||||||
- python: 3.6
|
|
||||||
env: DJANGO=master
|
|
||||||
|
|
||||||
- python: 3.7
|
|
||||||
env: DJANGO=2.2
|
|
||||||
- python: 3.7
|
|
||||||
env: DJANGO=3.0
|
|
||||||
- python: 3.7
|
|
||||||
env: DJANGO=master
|
|
||||||
|
|
||||||
|
|
||||||
- python: 3.8
|
|
||||||
env: DJANGO=2.2
|
|
||||||
- python: 3.8
|
|
||||||
env: DJANGO=3.0
|
|
||||||
- python: 3.8
|
|
||||||
env: DJANGO=master
|
|
||||||
|
|
||||||
install:
|
|
||||||
- pip install tox tox-travis
|
|
||||||
script:
|
|
||||||
- tox
|
|
||||||
after_success:
|
|
||||||
- pip install coveralls
|
|
||||||
- coveralls
|
|
||||||
24
tox.ini
24
tox.ini
@@ -1,23 +1,25 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist =
|
envlist =
|
||||||
{py27,py35,py36}-django111,
|
{py36,py37,py38,py39,py310}-django22,
|
||||||
{py35,py36,py37,py38}-django22,
|
{py36,py37,py38,py39,py310}-django32,
|
||||||
{py36,py37,py38}-django{30,master}
|
{py38,py39,py310}-django{40,master},
|
||||||
|
py310-djangomaster
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
deps=
|
deps=
|
||||||
django111: Django>=1.11,<2.0
|
|
||||||
django22: Django>=2.2,<3.0
|
django22: Django>=2.2,<3.0
|
||||||
django30: Django>=3.0,<4.0
|
django32: Django>=3.2,<4.0
|
||||||
|
django40: Django>=4.0,<4.1
|
||||||
djangomaster: https://github.com/django/django/archive/main.tar.gz
|
djangomaster: https://github.com/django/django/archive/main.tar.gz
|
||||||
-r requirements.txt
|
-r requirements.txt
|
||||||
coverage
|
coverage
|
||||||
|
|
||||||
commands= coverage run ./runtests.py
|
commands= coverage run ./runtests.py
|
||||||
|
|
||||||
[travis:env]
|
[gh-actions]
|
||||||
DJANGO =
|
python =
|
||||||
1.11: django111
|
3.6: py36-django{22,32}
|
||||||
2.2: django22
|
3.7: py37-django{22,32}
|
||||||
3.0: django30
|
3.8: py38-django{22,32,40}
|
||||||
master: djangomaster
|
3.9: py39-django{22,32,40}
|
||||||
|
3.10: py310-django{22,32,40,master}
|
||||||
|
|||||||
Reference in New Issue
Block a user