-
Notifications
You must be signed in to change notification settings - Fork 20
71 lines (55 loc) · 1.61 KB
/
Copy pathvalidate-pr.yml
File metadata and controls
71 lines (55 loc) · 1.61 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
name: "Validate Pull Request"
on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
lint:
name: Lint & format check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Ruff lint
run: uvx ruff check .
- name: Ruff format check
run: uvx ruff format --check .
notebooks:
name: Validate notebook structure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- run: uv sync --frozen
- name: Check notebook headers
run: >
uv run python .git-hooks/check-notebook-headers.py
--all-notebooks --exclude-archived --exclude-additional-drafts
- name: Check notebook imports (advisory)
run: >
uv run python .git-hooks/check-notebook-imports.py
--all-notebooks --exclude-archived --exclude-additional-drafts --warn-only
render:
name: Quarto render (no deploy)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: quarto-dev/quarto-actions/setup@v2
- uses: conda-incubator/setup-miniconda@v3
with:
activate-environment: quarto-env
environment-file: environment.yml
- name: Render site
uses: quarto-dev/quarto-actions/render@v2
- name: Upload rendered site
if: always()
uses: actions/upload-artifact@v4
with:
name: site-preview
path: _site/
retention-days: 5