Skip to content

Merge pull request #1019 from Metro-Records/fix-tag-search #729

Merge pull request #1019 from Metro-Records/fix-tag-search

Merge pull request #1019 from Metro-Records/fix-tag-search #729

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
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 --upgrade pip setuptools
pip install -r requirements.txt
- name: Test with pytest
run: |
mv configs/test_settings_deployment.py councilmatic/settings_deployment.py
pytest -sv
deploy:
needs: test
name: Deploy to AWS
runs-on: ubuntu-latest
steps:
- uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- uses: actions/checkout@v2
- id: deploy
uses: webfactory/create-aws-codedeploy-deployment@0d7a684950dae16883a140dd950257958730e0b5
with:
application: la-metro-councilmatic