-
Notifications
You must be signed in to change notification settings - Fork 91
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #163 from Hipo/replace-travis-with-github-actions
Replace Travis with GitHub Actions and add support for Python 3.9-3.10 and Django 3.2
- Loading branch information
Showing
7 changed files
with
62 additions
and
45 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,28 @@ | ||
name: Tests | ||
|
||
on: [push] | ||
|
||
jobs: | ||
tox: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.6', '3.7', '3.8', '3.9', '3.10'] | ||
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 | ||
sudo apt-get install gdal-bin | ||
- name: Run tests with tox | ||
run: tox | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
fail_ci_if_error: true | ||
verbose: true |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,15 @@ | ||
FROM ubuntu:18.04 | ||
|
||
MAINTAINER Marco Chiappetta <[email protected]> | ||
FROM ubuntu:latest | ||
|
||
# Needed to be able to install python versions. | ||
RUN apt-get update && apt-get install -y software-properties-common | ||
RUN add-apt-repository ppa:deadsnakes/ppa | ||
|
||
RUN apt-get update && apt-get install -y \ | ||
python3.5 \ | ||
python3.6 \ | ||
python3.7 \ | ||
python3.8 \ | ||
python3.9 \ | ||
python3.10 \ | ||
gdal-bin \ | ||
python3-pip | ||
|
||
|
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 |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
|
||
setup( | ||
name='drf-extra-fields', | ||
version='3.1.1', | ||
version='3.2.0', | ||
packages=['drf_extra_fields', | ||
'drf_extra_fields.runtests'], | ||
include_package_data=True, | ||
|
@@ -27,7 +27,7 @@ | |
author='hipo', | ||
author_email='[email protected]', | ||
url='https://github.com/Hipo/drf-extra-fields', | ||
python_requires=">=3.5", | ||
python_requires=">3.6", | ||
install_requires=requirements, | ||
classifiers=[ | ||
'Environment :: Web Environment', | ||
|
@@ -37,10 +37,11 @@ | |
'License :: OSI Approved :: BSD License', | ||
'Programming Language :: Python', | ||
'Programming Language :: Python :: 3', | ||
'Programming Language :: Python :: 3.5', | ||
'Programming Language :: Python :: 3.6', | ||
'Programming Language :: Python :: 3.7', | ||
'Programming Language :: Python :: 3.8', | ||
'Programming Language :: Python :: 3.9', | ||
'Programming Language :: Python :: 3.10', | ||
'Topic :: Internet :: WWW/HTTP', | ||
'Topic :: Internet :: WWW/HTTP :: Dynamic Content', | ||
], | ||
|
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,2 @@ | ||
docker build -t drf_extra_fields . | ||
docker run -v $(pwd):/app -it drf_extra_fields /bin/bash |
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,28 @@ | ||
[gh-actions] | ||
python = | ||
3.6: py36 | ||
3.7: py37 | ||
3.8: py38 | ||
3.9: py39 | ||
3.10: py310 | ||
|
||
[tox] | ||
envlist = | ||
flake8, | ||
py{35,36,37}-drf3-django{22}, | ||
py{36,37,38}-drf3-django{30,31} | ||
py{36,37,38,39,310}-drf3-django{22,30,31,32} | ||
|
||
[testenv] | ||
deps = | ||
django22: Django>=2.2,<2.3 | ||
django30: Django>=3.0,<3.1 | ||
django31: Django>=3.1,<3.2 | ||
django32: Django>=3.2,<3.3 | ||
drf3: djangorestframework>=3 | ||
-r requirements_dev.txt | ||
commands = | ||
py.test {posargs} --cov-report=xml --cov | ||
passenv = | ||
CI | ||
TRAVIS | ||
TRAVIS_* | ||
|
||
[testenv:flake8] | ||
deps = flake8 | ||
commands = | ||
flake8 | ||
passenv = | ||
CI | ||
TRAVIS | ||
TRAVIS_* |