Skip to content

Public service redesign #3

Public service redesign

Public service redesign #3

Workflow file for this run

name: CI
on:
pull_request:
branches: [main, main-dev]
jobs:
production_build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: user
POSTGRES_PASSWORD: temp38383810
POSTGRES_DB: db
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: 3.10.4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run tests
env:
DATABASE_URL: "postgres://user:temp38383810@localhost:5432/db"
DJANGO_SETTINGS_MODULE: "brandishseo.production_settings"
PRODUCTION_TEST: "True"
DEBUG: "0"
DJANGO_SECRET_KEY: ${{ secrets.DJANGO_SECRET_KEY }}
CDN_ACCESS: ${{ secrets.CDN_ACCESS }}
CDN_SECRET: ${{ secrets.CDN_SECRET }}
EMAIL_HOST: ${{ secrets.EMAIL_HOST }}
EMAIL_HOST_PASSWORD: ${{ secrets.EMAIL_HOST_PASSWORD }}
EMAIL_HOST_USER: ${{ secrets.EMAIL_HOST_USER }}
RECAPTCHA_PRIVATE_KEY: ${{ secrets.RECAPTCHA_PRIVATE_KEY }}
STRIPE_PRIVATE_KEY: ${{ secrets.STRIPE_PRIVATE_KEY }}
STRIPE_PUBLIC_KEY: ${{ secrets.STRIPE_PUBLIC_KEY }}
STRIPE_WEBHOOK_SECRET: ${{ secrets.STRIPE_WEBHOOK_SECRET }}
run: |
python manage.py migrate
python manage.py collectstatic --noinput
pytest -v