-
-
Notifications
You must be signed in to change notification settings - Fork 237
Expand file tree
/
Copy pathtests.yml
More file actions
58 lines (48 loc) · 1.41 KB
/
tests.yml
File metadata and controls
58 lines (48 loc) · 1.41 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
name: Testing {{cookiecutter.project_name}}
on: push
jobs:
lint:
strategy:
matrix:
include:
- name: Ruff format
cmd: ruff format --diff
- name: Ruff check
cmd: ruff check {{cookiecutter.project_name}} tests
- name: Mypy
cmd: mypy {{cookiecutter.project_name}} tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
with:
version: '0.9.17'
python-version: '3.13'
enable-cache: "auto"
- name: Install deps
run: uv sync --locked --all-groups
- name: Run lint check
run: uv run {{ '${{' }} matrix.cmd {{ '}}' }}
pytest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Create .env
run: touch .env
- name: Update docker-compose
uses: docker/setup-compose-action@v1
- name: Build api image (dev target)
run: |
docker compose \
-f docker-compose.yml \
-f deploy/docker-compose.dev.yml \
--project-directory . \
build api
- name: Run pytest
run: |
docker compose \
-f docker-compose.yml \
-f deploy/docker-compose.dev.yml \
--project-directory . \
run --rm api pytest -vv .