-
Notifications
You must be signed in to change notification settings - Fork 0
137 lines (132 loc) · 4.84 KB
/
python-fast-api-simple.yml
File metadata and controls
137 lines (132 loc) · 4.84 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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
---
name: python-fast-api-simple
on:
push:
paths:
- 'python/fast-api-simple/**'
pull_request:
paths:
- 'python/fast-api-simple/**'
jobs:
test-cookiecutter-rendering:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5
# @see https://github.com/actions/setup-python/issues/967#issuecomment-2430610509
- name: Set up Python 3.14
uses: actions/setup-python@v6
id: python
with:
python-version: 3.14
- name: Install dependencies
run: |
pipx install cookiecutter
pip install -U pytest
pip install -U cookiecutter
env:
PIPX_DEFAULT_PYTHON: ${{ steps.python.outputs.python-path }}
- name: Run tests
run: |
cd python/fast-api-simple
make test
- name: Upload pytest test results
uses: actions/upload-artifact@v4
with:
name: pytest-results-python-fast-api-simple
path: python/fast-api-simple/junit/test-results.xml
# Use always() to always run this step to publish test results when there are test failures
if: ${{ always() }}
test-with-poetry:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "python/fast-api-simple/{{cookiecutter.project_slug}}"
steps:
- name: Checkout repository
uses: actions/checkout@v5
# @see https://github.com/actions/setup-python/issues/967#issuecomment-2430610509
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Install poetry
run: |
pipx install poetry
- name: Create .venv
run: DOCKERFILE=Dockerfile.poetry make -f Makefile.poetry install
- name: Lint
run: DOCKERFILE=Dockerfile.poetry make -f Makefile.poetry lint
- name: Test
run: DOCKERFILE=Dockerfile.poetry make -f Makefile.poetry test
- name: Build docker
run: DOCKERFILE=Dockerfile.poetry make -f Makefile.poetry build-docker
test-with-poetry-in-docker:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "python/fast-api-simple/{{cookiecutter.project_slug}}"
steps:
- name: Checkout repository
uses: actions/checkout@v5
# @see https://github.com/actions/setup-python/issues/967#issuecomment-2430610509
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Build docker dev
run: DOCKERFILE=Dockerfile.docker.poetry make -f Makefile.docker.poetry build-docker-dev
- name: Create .venv
run: DOCKERFILE=Dockerfile.docker.poetry make -f Makefile.docker.poetry install
- name: Lint
run: DOCKERFILE=Dockerfile.docker.poetry make -f Makefile.docker.poetry lint
- name: Test
run: DOCKERFILE=Dockerfile.docker.poetry make -f Makefile.docker.poetry test
- name: Build docker
run: DOCKERFILE=Dockerfile.docker.poetry make -f Makefile.docker.poetry build-docker
test-with-uv:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "python/fast-api-simple/{{cookiecutter.project_slug}}"
steps:
- name: Checkout repository
uses: actions/checkout@v5
# @see https://github.com/actions/setup-python/issues/967#issuecomment-2430610509
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Install uv
run: curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Create .venv
run: DOCKERFILE=Dockerfile.uv make -f Makefile.uv sync
- name: Lint
run: DOCKERFILE=Dockerfile.uv make -f Makefile.uv lint
- name: Test
run: DOCKERFILE=Dockerfile.uv make -f Makefile.uv test
- name: Build docker
run: DOCKERFILE=Dockerfile.uv make -f Makefile.uv build-docker
test-with-uv-in-docker:
runs-on: ubuntu-latest
defaults:
run:
working-directory: "python/fast-api-simple/{{cookiecutter.project_slug}}"
steps:
- name: Checkout repository
uses: actions/checkout@v5
# @see https://github.com/actions/setup-python/issues/967#issuecomment-2430610509
- name: Set up Python 3.14
uses: actions/setup-python@v6
with:
python-version: 3.14
- name: Build docker dev
run: DOCKERFILE=Dockerfile.docker.uv make -f Makefile.docker.uv build-docker-dev
- name: Create .venv
run: DOCKERFILE=Dockerfile.docker.uv make -f Makefile.docker.uv sync
- name: Lint
run: DOCKERFILE=Dockerfile.docker.uv make -f Makefile.docker.uv lint
- name: Test
run: DOCKERFILE=Dockerfile.docker.uv make -f Makefile.docker.uv test
- name: Build docker
run: DOCKERFILE=Dockerfile.docker.uv make -f Makefile.docker.uv build-docker