-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (57 loc) · 1.71 KB
/
python.yml
File metadata and controls
72 lines (57 loc) · 1.71 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
name: Python (PY)
on:
push:
branches: ["staging", "premain", "main"]
pull_request:
branches: ["staging", "premain", "main"]
workflow_dispatch: {}
permissions:
contents: read
jobs:
py:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.14"
- name: Install uv (pinned)
run: |
python -m pip install --upgrade pip
python -m pip install uv==0.9.26
- name: Install dependencies
run: uv --directory py sync --frozen --all-extras
- name: Format check
run: uv --directory py run ruff format --check .
- name: Lint
run: uv --directory py run ruff check .
- name: Typecheck
run: uv --directory py run mypy src
- name: Build
run: uv --directory py run python -m build
- name: Unit tests + coverage (unit)
run: bash scripts/coverage-py.sh unit
- name: Start DynamoDB Local (pinned)
run: make docker-up
- name: Integration test
env:
AWS_REGION: us-east-1
AWS_DEFAULT_REGION: us-east-1
AWS_ACCESS_KEY_ID: dummy
AWS_SECRET_ACCESS_KEY: dummy
DYNAMODB_ENDPOINT: http://localhost:8000
run: uv --directory py run pytest -q tests/integration
- name: Stop DynamoDB Local
if: always()
run: make docker-down
- name: Upload coverage artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: py_coverage
path: |
py/coverage.xml
py/coverage-unit.txt
if-no-files-found: ignore