This repository was archived by the owner on May 19, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (79 loc) · 2.53 KB
/
python-test.yml
File metadata and controls
95 lines (79 loc) · 2.53 KB
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
name: Python Test
on:
workflow_call:
inputs:
python-version:
description: Python version for setup-python
type: string
required: false
default: "3.14"
poetry-version:
description: Poetry version to install via pip
type: string
required: false
default: "2.3.2"
run-unit-tests:
description: Run pytest with pytest-unit.ini (*_unit_test.py)
type: boolean
required: false
default: true
run-integration-tests:
description: Run pytest with pytest-integration.ini (*_integration_test.py)
type: boolean
required: false
default: true
run-e2e-tests:
description: Run pytest with pytest-e2e.ini (*_e2e_test.py)
type: boolean
required: false
default: true
jobs:
unit-tests:
if: ${{ inputs.run-unit-tests }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install Poetry
run: pip install "poetry==${{ inputs.poetry-version }}"
- name: Install dependencies
run: poetry install --with dev --no-interaction --no-ansi
- name: Unit tests
run: poetry run pytest src/ -v -c pytest-unit.ini
integration-tests:
if: ${{ inputs.run-integration-tests }}
runs-on: ubuntu-latest
env:
TESTCONTAINERS_RYUK_DISABLED: "true"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install Poetry
run: pip install "poetry==${{ inputs.poetry-version }}"
- name: Install dependencies
run: poetry install --with dev --no-interaction --no-ansi
- name: Integration tests
run: poetry run pytest src/ -v -c pytest-integration.ini
e2e-tests:
if: ${{ inputs.run-e2e-tests }}
runs-on: ubuntu-latest
env:
TESTCONTAINERS_RYUK_DISABLED: "true"
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ inputs.python-version }}
- name: Install Poetry
run: pip install "poetry==${{ inputs.poetry-version }}"
- name: Install dependencies
run: poetry install --with dev --no-interaction --no-ansi
- name: E2E tests
run: poetry run pytest src/ -v -c pytest-e2e.ini