Repository navigation
88 lines (76 loc) · 2.25 KB
/
Copy pathpython-test.yml
File metadata and controls
88 lines (76 loc) · 2.25 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
name: Python tests
on:
push:
branches:
- staging
- production
paths:
- .github/workflows/python-test.yml
- lambda/**
- packages/**
- watcher/**
- docs/site/src/lib/cli-catalog.snapshot.json
- pyproject.toml
- uv.lock
- Makefile
pull_request:
branches:
- staging
- production
paths:
- .github/workflows/python-test.yml
- lambda/**
- packages/**
- watcher/**
- docs/site/src/lib/cli-catalog.snapshot.json
- pyproject.toml
- uv.lock
- Makefile
jobs:
python-tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:17
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
DATABASE_URL: postgres://postgres:postgres@127.0.0.1:5432/data_hub_test
AUTH_SECRET: ci-test-secret-at-least-32-characters-long!!
AUTH_GOOGLE_ID: stub
AUTH_GOOGLE_SECRET: stub
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
- uses: astral-sh/setup-uv@v8.1.0
- name: Install Node.js packages
run: npm ci
working-directory: web
- name: Install ffmpeg
run: sudo apt-get update && sudo apt-get install -y ffmpeg
- name: Install Python packages
run: uv sync --all-packages
- name: Run all Python tests
run: make py-test
# The docs site renders its watcher CLI reference from a committed
# snapshot. Regenerate it and fail if the committed copy differs (or is
# missing).
- name: Check docs watcher CLI snapshot is current
run: |
make py-watcher-cli-catalog
snapshot=docs/site/src/lib/cli-catalog.snapshot.json
if [ -n "$(git status --porcelain -- $snapshot)" ]; then
echo "::error::The docs watcher CLI snapshot is out of date. Run 'make py-watcher-cli-catalog docs-bundle-generate' and commit both files."
git --no-pager diff --stat -- $snapshot
exit 1
fi