-
Notifications
You must be signed in to change notification settings - Fork 4
57 lines (49 loc) · 1.52 KB
/
Copy pathtest.yml
File metadata and controls
57 lines (49 loc) · 1.52 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
name: Test and Coverage
permissions:
contents: read
on:
pull_request:
types:
- opened
- synchronize
jobs:
test-fastapi-fastkit-sources:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.14" # max
- "3.13"
- "3.12" # min requirements
- "3.11" # supported, but full functionality not guaranteed
- "3.10" # supported, but full functionality not guaranteed
- "3.9" # supported, but full functionality not guaranteed
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup PDM
uses: pdm-project/setup-pdm@v4
- name: Install package managers for tests
run: |
pip install uv
pip install poetry
# PDM is already installed via setup-pdm action
- name: Install dependencies
run: pdm install -G dev
- name: Run tests with coverage
run: |
pdm run pytest --cov=src/fastapi_fastkit --cov-report=term-missing --cov-report=xml --cov-fail-under=70
- name: Upload coverage to Codecov
if: matrix.python-version == '3.12'
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}