Make Area model configurable #33
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: Python | |
on: | |
push: | |
branches: [ main, dev ] | |
pull_request: | |
branches: [ main, dev ] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install python and poetry | |
run: pipx install poetry | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
cache: "poetry" | |
- run: poetry install --with dev --no-root | |
- name: Lint with flake8 | |
if: always() | |
run: | | |
poetry run flake8 . | |
- name: Install OS level dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install binutils libproj-dev gdal-bin python3-psycopg2 | |
- name: Test with pytest | |
if: always() | |
run: poetry run pytest | |
- name: Test mypy | |
if: always() | |
run: poetry run mypy . | |
- name: Test with black | |
if: always() | |
run: poetry run black --check . | |
# Service containers to run postgres | |
services: | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: postgis/postgis:15-3.3 | |
# Provide the password for postgres. Should be sync'ed with test_settings file | |
env: | |
POSTGRES_USER: dird | |
POSTGRES_PASSWORD: dird | |
POSTGRES_DBNAME: dird_db | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 49156:5432 |