-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
87 additions
and
77 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,81 @@ | ||
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | ||
|
||
name: Python package | ||
|
||
on: | ||
push: | ||
branches: [ master ] | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
lint: | ||
|
||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.8'] | ||
|
||
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 | ||
python -m pip install black flake8 | ||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi | ||
- name: Lint with flake8 | ||
run: | | ||
black --check django_geosource | ||
flake8 django_geosource | ||
build: | ||
runs-on: ubuntu-latest | ||
needs: [lint] | ||
strategy: | ||
matrix: | ||
python-version: ['3.6', '3.7', '3.9'] | ||
django-version: [2.2.*, 3.1.*] | ||
#include: | ||
# - django-version: dev | ||
# python-version: 3.6 | ||
# continue-on-error: true | ||
# - django-version: dev | ||
# python-version: 3.9 | ||
# continue-on-error: true | ||
services: | ||
postgres: | ||
image: postgis/postgis:10-2.5 | ||
env: | ||
POSTGRES_PASSWORD: travis_ci_test | ||
POSTGRES_USER: travis_ci_test | ||
POSTGRES_DB: travis_ci_test | ||
ports: | ||
- 5432:5432 | ||
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: | | ||
sudo apt update && sudo apt-get -yq install libproj-dev binutils gdal-bin libgdal-dev | ||
python -m pip install --upgrade pip setuptools wheel | ||
pip install .[dev] -U | ||
if [[ ${{ matrix.django-version }} == dev ]]; then | ||
pip install -e git+https://github.com/django/django@master#egg=django; | ||
else | ||
pip install Django==${{ matrix.django-version }} -U; | ||
fi | ||
- name: Test with coverage | ||
run: | | ||
coverage run ./manage.py test | ||
- name: Coverage upload | ||
run: | | ||
pip install codecov | ||
codecov |
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