Feature plotsearch leasehistory #1287
Workflow file for this run
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
name: MVJ CI | |
on: | |
push: | |
branches: [master, develop] | |
pull_request: | |
branches: [master, develop] | |
jobs: | |
build: | |
env: | |
DATABASE_URL: 'postgis://postgres:postgres@localhost/github_actions' | |
runs-on: ubuntu-20.04 | |
strategy: | |
matrix: | |
python: [3.8] | |
services: | |
postgres: | |
image: postgis/postgis:10-2.5 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: github_actions | |
ports: | |
- 5432:5432 | |
# needed because the postgres container does not provide a healthcheck | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Apt-get update | |
run: sudo apt-get update | |
- name: Install postgis prerequisites | |
run: sudo apt-get install gdal-bin | |
- name: Install dependencies | |
run: | | |
pip install -U pip | |
pip install codecov -r requirements.txt -r requirements-dev.txt | |
- name: Check and run migrations | |
env: | |
DATABASE_URL: ${{ env.DATABASE_URL }} | |
run: | | |
python manage.py makemigrations --dry-run --check | |
python manage.py migrate | |
- name: Run black, flake8 and isort | |
run: | | |
black --check . | |
flake8 | |
isort . --check-only --diff | |
- name: Run tests | |
run: | | |
pytest -ra -vvv --doctest-modules --cov=. | |
./run-type-checks | |
- name: Run codecov | |
run: codecov |