Skip to content

Commit

Permalink
feat(CI): Add GitHub action (pennersr#2849)
Browse files Browse the repository at this point in the history
* Add GitHub action

* Add @Andrew-Chen-Wang to AUTHORS

* Exclude Python 3.5 and Django 3.2 from CI
  • Loading branch information
Andrew-Chen-Wang authored Nov 16, 2021
1 parent dfe5e42 commit 235b285
Show file tree
Hide file tree
Showing 4 changed files with 101 additions and 64 deletions.
84 changes: 84 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
name: CI

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

jobs:
testenv:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.5', '3.6', '3.7', '3.8', '3.9']
django-version: ['master', '2.0', '2.1', '2.2', '3.0', '3.1', '3.2']
exclude:
- python-version: '3.5'
django-version: '3.0'
- python-version: '3.5'
django-version: '3.1'
- python-version: '3.5'
django-version: '3.2'
- python-version: '3.8'
django-version: '2.0'
- python-version: '3.8'
django-version: '2.1'
- python-version: '3.9'
django-version: '2.0'
- python-version: '3.9'
django-version: '2.1'
- python-version: '3.5'
django-version: 'master'
- python-version: '3.6'
django-version: 'master'
- python-version: '3.7'
django-version: 'master'
- python-version: '3.9'
django-version: 'master'

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
pip install tox tox-gh-actions coveralls
- name: Tox Test
run: tox
env:
PYTHON_VER: ${{ matrix.python-version }}
DJANGO: ${{ matrix.django-version }}
- name: Coverage (Coveralls)
if: ${{ success() }}
run: coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

extra:
runs-on: ubuntu-latest
strategy:
matrix:
extra-env: ['docs', 'checkqa', 'standardjs']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
if: ${{ matrix.extra-env == 'standardjs' }}
with:
node-version: '8'
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: '3.7'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Tox Test
run: tox
env:
TOXENV: ${{ matrix.extra-env }}
64 changes: 0 additions & 64 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Ahmet Emre Aladağ
Aldiantoro Nugroho
Alexander Gaevsky
Andrean Franc
Andrew Chen Wang
Andrey Akolpakov
Andrey Balandin
Andy Matthews
Expand Down
16 changes: 16 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,19 @@ include = allauth*

[flake8]
exclude = migrations

[gh-actions:env]
PYTHON_VER =
3.5: py35
3.6: py36
3.7: py37
3.8: py38
3.9: py39
DJANGO =
master: djangomaster
2.0: django20
2.1: django21
2.2: django22
3.0: django30
3.1: django31
3.2: django32

0 comments on commit 235b285

Please sign in to comment.