Override original framework #1
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: Tests | |
on: | |
push: | |
pull_request: | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
strategy: | |
max-parallel: 4 | |
matrix: | |
python-version: ["3.10", "3.11"] | |
services: | |
postgres: | |
image: postgres:14 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: db_test | |
ports: | |
- 5432:5432 | |
options: --health-cmd pg_isready --health-interval 5s --health-timeout 5s --health-retries 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: '**/requirements/development.txt' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r app/requirements/development.txt | |
- name: Run tests | |
env: | |
DB_HOST: localhost | |
DB_PORT: 5432 | |
DB_USER: postgres | |
DB_PASS: postgres | |
DB_BASE: db_test | |
run: cd app && pytest . |