Skip to content

Commit

Permalink
ci: add github CI to replace travis CI (#1051)
Browse files Browse the repository at this point in the history
  • Loading branch information
mariajgrimaldi authored Sep 7, 2021
1 parent 89403af commit aa75456
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 64 deletions.
93 changes: 93 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: CI

on:
push:
branches: [ master ]
pull_request:
branches:
- '**'


jobs:
run_unittest_tests:
name: Unittest
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.5", "3.6", "3.7", "3.8", "3.9"]
django-version: ["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"

steps:
- uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
pip install --upgrade setuptools
pip install tox
- name: Run unittest Python ${{ matrix.python-version }} -- Django ${{ matrix.django-version }}
env:
TOXENV: py${{ matrix.python-version }}-django${{ matrix.django-version }}
run: tox

run_integration_tests:
name: Integration tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.5"]

steps:
- uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
pip install --upgrade setuptools
pip install tox
- name: Integration tests
env:
TOXENV: integration
run: tox

run_quality_tests:
name: Quality tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
python-version: ["3.6"]

steps:
- uses: actions/checkout@v2
- name: setup python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install Dependencies
run: |
pip install tox
- name: Quality tests
env:
TOXENV: flake8
run: |
tox
57 changes: 0 additions & 57 deletions .travis.yml

This file was deleted.

16 changes: 9 additions & 7 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
[tox]
minversion = 1.9
envlist =
py{35,36,37,38,39}-django22
py{36,37,38,39}-django30
py{36,37,38,39}-django31
py{36,37,38,39}-djangomain
py{3.5,3.6,3.7,3.8,3.9}-django2.2
py{3.6,3.7,3.8,3.9}-django3.0
py{3.6,3.7,3.8,3.9}-django3.1
py{3.6,3.7,3.8,3.9}-django3.2
py{3.6,3.7,3.8,3.9}-djangomain
integration
flake8

Expand All @@ -15,9 +16,10 @@ setenv =
PYTHONDONTWRITEBYTECODE = 1
commands = pytest --cov=storages --ignore=tests/integration/ tests/ {posargs}
deps =
django22: Django>=2.2,<3.0
django30: Django>=3.0,<3.1
django31: Django>=3.1,<3.2
django2.2: Django>=2.2,<3.0
django3.0: Django>=3.0,<3.1
django3.1: Django>=3.1,<3.2
django3.2: Django>=3.2,<4.0
djangomain: https://github.com/django/django/archive/main.tar.gz
cryptography
pytest
Expand Down

0 comments on commit aa75456

Please sign in to comment.