Bump drf-spectacular from 0.26.2 to 0.26.4 in /server #231
Workflow file for this run
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: 'Haztrak Server Tests' | |
# This workflow is responsible for running the Haztrak server tests. | |
# It spins up a postgres container and runs the tests against it. | |
env: | |
POSTGRES_USER: admin | |
POSTGRES_PASSWORD: password1 | |
POSTGRES_DB: haztrak_db | |
on: | |
pull_request: | |
branches: ['main'] | |
paths: | |
- 'server/**' | |
- '.github/workflows/test_server.yaml' | |
workflow_call: | |
workflow_dispatch: | |
defaults: | |
run: | |
working-directory: ./server | |
jobs: | |
run_server_tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ['3.10', '3.11'] | |
services: | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_USER: ${{ env.POSTGRES_USER }} | |
POSTGRES_PASSWORD: ${{ env.POSTGRES_PASSWORD }} | |
POSTGRES_DB: ${{ env.POSTGRES_DB }} | |
ports: | |
- 5432/tcp | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
cache: 'pip' | |
python-version: ${{ matrix.python-version }} | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements_dev.txt | |
- name: Run Tests | |
env: | |
HT_SECRET_KEY: 'django-insecure-%btjqoun@6ps$e@8bw$48s+!x1e4aiz&5p2nrf6cmiw4)jsx5d' | |
HT_CORS_DOMAIN: http://localhost:3000 | |
HT_TIMEZONE: America/New_York | |
HT_HOST: localhost | |
HT_RCRAINFO_ENV: preprod | |
HT_DEBUG: true | |
HT_DB_ENGINE: django.db.backends.postgresql | |
HT_DB_HOST: localhost | |
HT_DB_USER: ${{ env.POSTGRES_USER }} | |
HT_DB_PASSWORD: ${{ env.POSTGRES_PASSWORD }} | |
HT_DB_NAME: ${{ env.POSTGRES_DB }} | |
HT_DB_PORT: ${{ job.services.postgres.ports[5432] }} | |
run: | | |
pytest |