-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (95 loc) · 2.86 KB
/
Copy pathci.yml
File metadata and controls
101 lines (95 loc) · 2.86 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
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
cache: pip
- run: python -m pip install -e ".[dev]"
- run: python -m pytest
- name: Build wheel
run: |
python -m pip install build
python -m build
- name: Check packages
run: |
wheel=$(find dist -name '*.whl' -print -quit)
sdist=$(find dist -name '*.tar.gz' -print -quit)
python scripts/verify_distribution.py "$wheel" "$sdist"
python -m venv /tmp/pqviewer-smoke
/tmp/pqviewer-smoke/bin/pip install "$wheel"
cd /tmp
/tmp/pqviewer-smoke/bin/pqviewer --help
/tmp/pqviewer-smoke/bin/pqviewer render --help
/tmp/pqviewer-smoke/bin/pqviewer-render --help
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
cache: pip
- run: python -m pip install -e ".[docs]"
- run: python -m sphinx -W --keep-going -b html docs docs/_build/html
frontend:
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: "24"
cache: npm
cache-dependency-path: frontend/package-lock.json
- run: npm ci
- run: npm run build
- name: Run frontend tests when available
run: npm run test --if-present
- name: Verify bundled frontend
working-directory: .
run: git diff --exit-code -- pqviewer/static
browser:
runs-on: ubuntu-24.04
timeout-minutes: 30
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: "3.12"
cache: pip
- run: python -m pip install -e ".[dev,render]"
- uses: actions/setup-node@v7
with:
node-version: "24"
cache: npm
cache-dependency-path: frontend/package-lock.json
- working-directory: frontend
run: npm ci
- working-directory: frontend
run: npx playwright install --with-deps chromium
- run: python -m playwright install chromium
- working-directory: frontend
run: npm run test:e2e
- name: Smoke-test headless rendering
env:
PQVIEWER_HEADLESS_TEST: "1"
run: python -m pytest tests/test_recipe.py -k headless_render_command
- name: Upload browser artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: browser-artifacts
path: output/playwright
if-no-files-found: ignore