-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (63 loc) · 2.13 KB
/
Copy pathci.yml
File metadata and controls
73 lines (63 loc) · 2.13 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
# Verification, run the same way it is run locally.
#
# The matrix is discovered rather than listed: scripts/verify.sh --list is the
# single source of truth for what a project is, so adding one cannot leave it
# silently untested here.
name: ci
on:
push:
branches: [main]
pull_request:
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
discover:
name: discover projects
runs-on: ubuntu-latest
outputs:
projects: ${{ steps.list.outputs.projects }}
steps:
- uses: actions/checkout@v7
- id: list
run: |
projects="$(./scripts/verify.sh --list | jq -R -s -c 'split("\n") | map(select(length > 0))')"
echo "projects=$projects" >> "$GITHUB_OUTPUT"
echo "discovered: $projects"
verify:
name: verify ${{ matrix.project }}
needs: discover
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
project: ${{ fromJSON(needs.discover.outputs.projects) }}
steps:
- uses: actions/checkout@v7
# setup-uv publishes no floating v10 tag -- its majors stop at v7 -- so
# this is pinned to the exact release.
- uses: astral-sh/setup-uv@v10.0.1
with:
enable-cache: true
cache-dependency-glob: ${{ matrix.project }}/uv.lock
# lint, both type checkers, tests, and every example. The examples are
# deterministic and offline by convention, and anything that wants a
# real service falls back and says what the fallback cannot show -- so
# a runner with no Docker daemon is a supported way to run them.
- run: ./scripts/verify.sh ${{ matrix.project }}
docs:
name: docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
# setup-uv publishes no floating v10 tag -- its majors stop at v7 -- so
# this is pinned to the exact release.
- uses: astral-sh/setup-uv@v10.0.1
with:
enable-cache: true
# Builds the site under --strict, checks every relative link, and
# enforces the per-example documentation standard.
- run: make docs-build