Skip to content

Merge pull request #40 from Azure-Samples/avm_update1 #64

Merge pull request #40 from Azure-Samples/avm_update1

Merge pull request #40 from Azure-Samples/avm_update1 #64

Workflow file for this run

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-13", "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@v6
- name: Setup python
uses: actions/setup-python@v4
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 -m flask --app src.flaskapp db upgrade --directory src/flaskapp/migrations
python3 -m flask --app src.flaskapp seed --filename src/seed_data.json
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