Repository navigation
58 lines (54 loc) · 1.44 KB
/
Copy pathci.yml
File metadata and controls
58 lines (54 loc) · 1.44 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: CI
on:
push:
branches: [main]
pull_request:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
backend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- run: uv venv
- run: uv pip install -e ".[dev]"
# Tests run entirely against saved fixtures, so CI never touches the live sites.
- run: uv run pytest -q
- run: uv run ruff check .
- run: uv run ruff format --check .
frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
# The build prerenders a page per hackathon, so it needs real data from the data branch.
- name: Get the current data
working-directory: .
run: scripts/data-branch.sh pull
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Build the site bundle
working-directory: backend
run: |
uv venv
uv pip install -e .
uv run python -m app.jobs.export_site
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: frontend/package-lock.json
- run: npm ci
- run: npx tsc -b
- run: npm test
- run: npm run build