Skip to content

Conditionally import ZoneInfo; use GHA matrix strategy #29

Conditionally import ZoneInfo; use GHA matrix strategy

Conditionally import ZoneInfo; use GHA matrix strategy #29

Workflow file for this run

name: CI - Pytest
on:
workflow_dispatch:
pull_request:
types: [opened, reopened, edited, synchronize]
env:
CATCHPY_DOTENV_PATH: docker_dotenv.env
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Build Docker images
run: |
PYTHON_VERSION=${{ matrix.python-version }} docker compose -f docker-compose-test.yml build
- name: Run Docker Compose containers
run: |
PYTHON_VERSION=${{ matrix.python-version }} docker compose -f docker-compose-test.yml up -d
- name: Run Pytest unit tests within Compose
run: |
docker compose -f docker-compose-test.yml exec web pytest
- name: Stop Docker Compose containers
if: always()
run: docker compose -f docker-compose.yml down