Skip to content

Allow for notices on all event pages #1063

Allow for notices on all event pages

Allow for notices on all event pages #1063

Workflow file for this run

name: Test and deploy
on:
push:
branches:
- main
- deploy
pull_request:
jobs:
test:
name: Run tests
runs-on: ubuntu-20.04
services:
postgres:
image: postgis/postgis:14-3.2
env:
POSTGRES_DB: lametro
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
elasticsearch:
image: elasticsearch:7.14.2
ports:
- 9200:9200
env:
discovery.type: single-node
options: >-
--health-cmd "curl http://localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 10
steps:
- uses: actions/checkout@v2
- name: Lint the code
run: |
pip install black flake8
flake8 . --exclude lametro/migrations,councilmatic/settings*
black --check . --exclude lametro/migrations councilmatic/settings.py councilmatic/settings_jurisdiction.py
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install gdal-bin
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install pip==24.0
pip install --upgrade setuptools
pip install -r requirements.txt
- name: Test with pytest
env:
DATABASE_URL: postgis://postgres:postgres@localhost:5432/lametro
SEARCH_URL: http://localhost:9200
run: |
cp .env.local.example .env.local
pytest -sv