-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (77 loc) · 2.22 KB
/
build-pr.yml
File metadata and controls
96 lines (77 loc) · 2.22 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
name: build-pr
permissions:
contents: read
on:
pull_request:
branches:
- master
- dev
paths-ignore:
- "**.md"
- ".github/ISSUE_TEMPLATE/**"
env:
PNPM_VERSION: 10
NODE_VERSION: 20
PYTHON_VERSION: "3.13"
jobs:
test:
name: Run Tests & Build Validation
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install uv
run: pip install uv
- name: Install Python dependencies
run: uv sync
- name: Run Python linting
run: uv run ruff check backend/
- name: Run Python tests
run: uv run pytest backend/tests/ -v --tb=short
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: ${{ env.PNPM_VERSION }}
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: pnpm
cache-dependency-path: "frontend/pnpm-lock.yaml"
- name: Install frontend dependencies
working-directory: frontend
env:
NODE_ENV: development
run: pnpm install --frozen-lockfile
- name: Prepare frontend (nuxt prepare)
working-directory: frontend
env:
NODE_ENV: development
run: pnpm nuxt prepare
- name: Run frontend linting
working-directory: frontend
run: pnpm run lint
- name: Run frontend type checking
working-directory: frontend
run: pnpm run typecheck
- name: Run frontend tests
working-directory: frontend
run: pnpm run test:ci
- name: Build frontend
working-directory: frontend
run: pnpm run generate
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Validate Docker build
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64
push: false
cache-from: type=gha,scope=${{ github.workflow }}
cache-to: type=gha,mode=max,scope=${{ github.workflow }}
provenance: false