Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 59 additions & 0 deletions .github/workflows/django.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Django CI

on:
[pull_request, pull_request_target]

jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.6, 3.7, 3.8]

steps:
- uses: actions/checkout@v2
- name: Setup PostgreSQL with Postgis
uses: huaxk/postgis-action@v1.0.0
with:
postgresql version: latest
postgresql db: osmcha
postgresql user: ${{ secrets.POSTGRES_USER }}
postgresql password: ${{ secrets.POSTGRES_PASSWORD }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install Dependencies
run: |
sudo apt-get install -y binutils libproj-dev python3-gdal libgeos-dev libyaml-dev
python -m pip install --upgrade pip
pip install --upgrade coveralls
pip install -r requirements/test.txt
- name: Run Tests
run: |
coverage run manage.py test --settings=config.settings.tests
env:
OAUTH_OSM_KEY: ${{ secrets.OAUTH_OSM_KEY }}
OAUTH_OSM_SECRET: ${{ secrets.OAUTH_OSM_SECRET }}
POSTGRES_USER: ${{ secrets.POSTGRES_USER }}
POSTGRES_PASSWORD: ${{ secrets.POSTGRES_PASSWORD }}
- name: Upload Coverage
run: coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: ${{ matrix.test-name }}
COVERALLS_PARALLEL: true

coveralls:
name: Finish Coveralls
needs: build
runs-on: ubuntu-latest
container: python:3-slim
steps:
- name: Finished
run: |
pip install --upgrade coveralls
coveralls --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 changes: 0 additions & 38 deletions .travis.yml

This file was deleted.

1 change: 0 additions & 1 deletion requirements/local.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Local development dependencies go here
-r test.txt
django-extensions==3.0.9
coverage==5.3
Sphinx==3.2.1
Werkzeug==1.0.1

Expand Down
1 change: 1 addition & 0 deletions requirements/test.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Test dependencies go here.
-r base.txt
flake8==3.8.4
coverage==5.3
django-test-plus==1.4.0
factory-boy==3.1.0