Repository navigation
110 lines (101 loc) · 5.71 KB
/
Copy pathci.yml
File metadata and controls
110 lines (101 loc) · 5.71 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
102
103
104
105
106
107
108
109
110
name: ci
on:
push:
branches: [main]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
# 22, matching release.yml. NOT cosmetic: the DOM suites talk to Chrome over a
# WebSocket, and `WebSocket` only became a Node global in 22 — on 20 they die with
# `ReferenceError: WebSocket is not defined`. Nobody could discover that while the
# suites were skipping for want of a browser, which is finding #1 in one sentence.
node-version: 22
# The package has no dependencies, so there is nothing to install.
- name: Build dist + tokens
run: node scripts/build.mjs
# check-icons compares every icon token with lucide's own drawing, at the version tokens.css
# names. The package installs nothing, so the drawings are borrowed: into the runner's temp dir,
# never into the repository, with no lifecycle scripts.
- name: Borrow lucide-react 0.559.0 for check-icons
run: npm install --no-save --no-package-lock --ignore-scripts --prefix "$RUNNER_TEMP/lucide" lucide-react@0.559.0
# check-tailwind-layers' browser half compiles the shipped entry with a real Tailwind and reads
# the result in a browser. The package installs nothing, so the compiler is borrowed the same
# way (exact version; it pulls tailwindcss at the same number), and the suite's step sets
# DD_REQUIRE_TAILWIND so a runner that cannot find it fails instead of skipping.
- name: Borrow @tailwindcss/node 4.3.3 for check-tailwind-layers
run: npm install --no-save --no-package-lock --ignore-scripts --prefix "$RUNNER_TEMP/tailwind" @tailwindcss/node@4.3.3
# check-integration and check-bake draw templates/documentation.html's diagram with mermaid.
# The template loads it from jsDelivr; the suites load this copy instead (check-integration
# compares its version with the template's import) and block the CDN's mermaid in their
# browser, so a CDN outage cannot fail a release and a CDN-only pass is impossible.
- name: Borrow mermaid 11.16.0 for check-integration and check-bake
run: npm install --no-save --no-package-lock --ignore-scripts --prefix "$RUNNER_TEMP/mermaid" mermaid@11.16.0
# EVERY scripts/check-*.mjs, and none may skip (check-release-gate.mjs fails a suite that is
# missing here or in release.yml, or a flag missing from its step):
# DD_REQUIRE_BROWSER a DOM suite with no browser exits 0 with SKIPPED; this makes it a failure
# DD_FORBID_STANDINS a stand-in for a real rule in force is a failure, not a note
# DD_REQUIRE_LUCIDE check-icons' drawing comparison must run
# DD_REQUIRE_COCKPIT_DOM_PATCH the suites that drive the runtime under cockpit's patcher must
# find it: CI has no infra checkout, so DD_COCKPIT_DOM_PATCH points at the
# vendored copy in scripts/fixtures (its header names the commit)
# DD_REQUIRE_TAILWIND check-tailwind-layers' browser half must find the Tailwind compiler
# (DD_TAILWIND_NODE, borrowed above), not skip
# DD_MERMAID check-integration and check-bake draw the template's diagram from this
# copy of mermaid, with the CDN's mermaid blocked, so they need no network
- name: Every suite
env:
DD_REQUIRE_BROWSER: "1"
DD_FORBID_STANDINS: "1"
DD_REQUIRE_LUCIDE: "1"
DD_LUCIDE_REACT: ${{ runner.temp }}/lucide/node_modules/lucide-react
DD_REQUIRE_TAILWIND: "1"
DD_TAILWIND_NODE: ${{ runner.temp }}/tailwind/node_modules/@tailwindcss/node
DD_MERMAID: ${{ runner.temp }}/mermaid/node_modules/mermaid
DD_COCKPIT_DOM_PATCH: ${{ github.workspace }}/scripts/fixtures/cockpit-dom-patch.js
DD_REQUIRE_COCKPIT_DOM_PATCH: "1"
run: |
node scripts/check-pagination.mjs
node scripts/check-integration.mjs
node scripts/check-readme-pins.mjs
node scripts/check-release-gate.mjs
node scripts/check-tooltip-marks.mjs
node scripts/check-foundations.mjs
node scripts/check-tailwind-layers.mjs
node scripts/check-icons.mjs
node scripts/check-components.mjs
node scripts/check-dropdown.mjs
node scripts/check-fold.mjs
node scripts/check-minimap.mjs
node scripts/check-controls.mjs
node scripts/check-feedback.mjs
node scripts/check-notice.mjs
node scripts/check-filters.mjs
node scripts/check-data.mjs
node scripts/check-tabs.mjs
node scripts/check-time.mjs
node scripts/check-tickstrip.mjs
node scripts/check-charts.mjs
node scripts/check-tabletools.mjs
node scripts/check-tablescroll.mjs
node scripts/check-tooltip-click.mjs
node scripts/check-cards.mjs
node scripts/check-overlays.mjs
node scripts/check-content.mjs
node scripts/check-copy.mjs
node scripts/check-chrome.mjs
node scripts/check-runtime-bundle.mjs
node scripts/check-bake.mjs
node scripts/check-prose.mjs
# The dist bundle and tokens.json are committed (jsDelivr serves them). Fail
# if a source change landed without rebuilding the committed artifacts.
- name: Verify committed artifacts are up to date
run: |
if ! git diff --exit-code dist tokens/tokens.json; then
echo "::error::dist/ or tokens/tokens.json is out of date — run 'npm run build' and commit the result."
exit 1
fi