-
Notifications
You must be signed in to change notification settings - Fork 1
106 lines (88 loc) · 2.71 KB
/
Copy pathci.yml
File metadata and controls
106 lines (88 loc) · 2.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
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
name: CI
on:
pull_request:
push:
branches:
- main
jobs:
backend:
name: backend
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/backend
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Set up uv
uses: astral-sh/setup-uv@v6
with:
version: "0.11.6"
- name: Cache uv packages
uses: actions/cache@v4
with:
path: ~/.cache/uv
key: ${{ runner.os }}-uv-${{ hashFiles('src/backend/pyproject.toml', 'src/backend/uv.lock') }}
restore-keys: |
${{ runner.os }}-uv-
- name: Install backend dependencies
run: uv sync --frozen --extra dev
- name: Verify Alembic migrations and model drift
env:
JWT_SECRET_KEY: ci-jwt-secret-key-not-used-at-runtime
LOG_INGEST_SHARED_SECRET: ci-log-ingest-secret-not-used-at-runtime
DATABASE_URL: sqlite:///./ci_alembic_check.db
run: |
uv run alembic upgrade heads
uv run alembic check
- name: Run backend tests with coverage
run: uv run pytest --cov=app
- name: Run mypy
run: uv run mypy app/
- name: Run ruff
run: uv run ruff check app/
- name: Detect Polish diacritics in backend Python files
working-directory: src/backend
run: |
status=0
grep -RIn --include='*.py' "[ąćęłńóśźżĄĆĘŁŃÓŚŹŻ]" app || status=$?
if [ "$status" -eq 0 ]; then
echo "Found Polish diacritics in backend Python files under src/backend/app."
exit 1
fi
if [ "$status" -ne 1 ]; then
echo "grep failed while scanning backend Python files under src/backend/app."
exit "$status"
fi
frontend:
name: frontend
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/frontend
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10.30.0
run_install: false
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: pnpm
cache-dependency-path: src/frontend/pnpm-lock.yaml
- name: Install frontend dependencies
run: pnpm install --frozen-lockfile
- name: Run frontend type-check
run: pnpm run type-check
- name: Run frontend lint
run: pnpm run lint
- name: Run frontend tests
run: pnpm run test