-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Travis to GitHub actions, update test scripts
- Loading branch information
Showing
6 changed files
with
98 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
[run] | ||
source = fluentcms_contactform/ | ||
omit = | ||
*/migrations/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: CI Testing | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
test: | ||
name: "Python ${{ matrix.python }} Django ${{ matrix.django }}" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
# max-parallel: 8 # default is max available | ||
fail-fast: false | ||
matrix: | ||
include: | ||
# Django 2.2 | ||
- django: "2.2" | ||
python: "3.6" | ||
# Django 3.1 | ||
- django: "3.1" | ||
python: "3.6" | ||
# Django 3.2 | ||
- django: "3.2" | ||
python: "3.6" | ||
# Django 4.0 | ||
- django: "4.0b1" | ||
python: "3.10" | ||
|
||
steps: | ||
- name: Install gettext | ||
run: sudo apt-get install -y gettext | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Python ${{ matrix.python }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
# Way more efficient then caching pip | ||
- name: Cache Python site-packages | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.pythonLocation }} | ||
key: ${{ env.pythonLocation }}-${{ matrix.django }}-${{ hashFiles('setup.py') }} | ||
|
||
# Using eager strategy to avoid reusing older packages from cache | ||
- name: Install Packages | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -U --upgrade-strategy=eager "Django~=${{ matrix.django }}" codecov -e .[tests] | ||
- name: Run Tests | ||
run: | | ||
echo "Python ${{ matrix.python }} / Django ${{ matrix.django }}" | ||
coverage run --rcfile=.coveragerc runtests.py | ||
codecov | ||
continue-on-error: ${{ contains(matrix.django, '4.0') }} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,26 @@ | ||
[tox] | ||
envlist= | ||
py27-django{110,111}, | ||
py34-django{110,111}, | ||
py36-django{111,20}, | ||
# py33-django-dev, | ||
coverage, | ||
docs, | ||
py36-django{22,31,32}, | ||
coverage | ||
|
||
[testenv] | ||
deps = | ||
django110: Django >= 1.10,<1.11 | ||
django110: django-polymorphic<2.0 | ||
django111: Django >= 1.11,<2.0 | ||
django20: Django >= 2.0,<2.1 | ||
django-dev: https://github.com/django/django/tarball/master | ||
django22: Django ~= 2.2 | ||
django31: Django ~= 3.1 | ||
django32: Django ~= 3.2 | ||
django-dev: https://github.com/django/django/tarball/main | ||
phonenumberslite | ||
django-crispy-forms | ||
commands= | ||
python runtests.py | ||
|
||
[testenv:coverage] | ||
basepython=python3.3 | ||
basepython=python3.8 | ||
deps= | ||
django==1.9.4 | ||
django | ||
coverage | ||
phonenumberslite | ||
commands= | ||
coverage erase | ||
coverage run --source=fluentcms_contactform runtests.py | ||
coverage run --rcfile=.coveragerc runtests.py | ||
coverage report |