Add app diagnostics and disable metadata write #29
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: Run Python E2E tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test_package: | |
name: Test ${{ matrix.os }} Python ${{ matrix.python_version }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["ubuntu-latest", "macos-latest", "macos-latest-xlarge", "windows-latest"] | |
python_version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | |
exclude: | |
- os: macos-latest-xlarge | |
python_version: 3.8 | |
- os: macos-latest-xlarge | |
python_version: 3.9 | |
- os: macos-latest-xlarge | |
python_version: "3.10" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Check for MacOS Runner | |
if: matrix.os == 'macos-latest-xlarge' | |
run: brew install postgresql@14 | |
- name: Setup postgres | |
uses: ikalnytskyi/action-setup-postgres@v4 | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python_version }} | |
architecture: x64 | |
- name: Install dependencies | |
run: | | |
python3 -m pip install --upgrade pip | |
python3 -m pip install -r requirements-dev.txt | |
playwright install chromium --with-deps | |
python3 -m pip install -e src | |
- name: Seed data | |
run: | | |
python3 src/fastapi_app/seed_data.py | |
env: | |
POSTGRES_HOST: localhost | |
POSTGRES_USERNAME: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DATABASE: postgres | |
- name: Run tests Windows | |
if: runner.os == 'windows' | |
run: python3 -m pytest --ignore=src/tests/local/test_gunicorn.py | |
env: | |
POSTGRES_HOST: localhost | |
POSTGRES_USERNAME: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DATABASE: postgres | |
- name: Run tests | |
if: runner.os != 'windows' | |
run: python3 -m pytest | |
env: | |
POSTGRES_HOST: localhost | |
POSTGRES_USERNAME: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DATABASE: postgres |