forked from nmaekawa/catchpy
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (27 loc) · 992 Bytes
/
ci-pytest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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