Add status field to test. Also run black. #54
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: FVH Feedback Map CI | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgis/postgis | |
env: | |
POSTGRES_DB: feedback_map_dev | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: feedback_map | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Set up Python 3.11 | |
uses: actions/setup-python@v1 | |
with: | |
python-version: 3.11 | |
- name: Install dependencies | |
run: | | |
sudo apt-get install gdal-bin | |
python -m pip install --upgrade pip | |
pip install pipenv | |
cd django_server; pipenv install --system --deploy | |
- name: Lint with flake8 | |
run: | | |
# stop the build if there are Python syntax errors or undefined names | |
cd django_server | |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics | |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide | |
flake8 . --count --exit-zero --statistics | |
- name: Test | |
run: | | |
cd django_server | |
coverage run --source='.' manage.py test | |
coverage report |