-
-
Notifications
You must be signed in to change notification settings - Fork 4
226 lines (191 loc) · 6.62 KB
/
Copy pathpages.yml
File metadata and controls
226 lines (191 loc) · 6.62 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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
name: Deploy Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: true
jobs:
build-c0-compatibility:
runs-on: ubuntu-latest
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout contract source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Read pinned C0 contract
id: c0
shell: bash
run: |
python - <<'PY'
import json
import os
from pathlib import Path
contract = json.loads(Path("contracts/webCompatibilityC0.json").read_text(encoding="utf-8"))
commit = contract["source"]["commit"]
if len(commit) != 40:
raise SystemExit("invalid C0 source commit")
with Path(os.environ["GITHUB_OUTPUT"]).open("a", encoding="utf-8") as output:
output.write(f"source_commit={commit}\n")
PY
cp contracts/webCompatibilityC0.json "$RUNNER_TEMP/webCompatibilityC0.json"
cp docs/skills/ops/tools/verifyWebCompatibilityC0.py "$RUNNER_TEMP/verifyWebCompatibilityC0.py"
- name: Checkout pinned C0 source
run: |
git config core.autocrlf false
git checkout --detach "${{ steps.c0.outputs.source_commit }}"
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: editor/package-lock.json
- name: Install pinned editor
working-directory: editor
run: npm ci
- name: Build pinned C0 app tree
working-directory: editor
env:
CODARO_WEB_BASE: codaro/app
CODARO_WEB_OUT: ../landing/static/app
run: npm run build
- name: Verify pinned C0 identity
run: >-
python -X utf8 "$RUNNER_TEMP/verifyWebCompatibilityC0.py"
--contract "$RUNNER_TEMP/webCompatibilityC0.json"
--tree landing/static/app
- name: Upload pinned C0 tree
uses: actions/upload-artifact@v4
with:
name: web-compatibility-c0
path: landing/static/app
if-no-files-found: error
retention-days: 90
build:
runs-on: ubuntu-latest
needs: build-c0-compatibility
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: |
editor/package-lock.json
landing/package-lock.json
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Install Editor
working-directory: editor
run: npm ci
- name: Build Primary Web Run
working-directory: editor
env:
CODARO_WEB_BASE: codaro/run
CODARO_WEB_OUT: ../landing/static/run
run: npm run build
- name: Download pinned C0 app tree
uses: actions/download-artifact@v4
with:
name: web-compatibility-c0
path: landing/static/app
- name: Verify composed C0 identity
run: >-
python -X utf8 docs/skills/ops/tools/verifyWebCompatibilityC0.py
--tree landing/static/app
- name: Install
working-directory: landing
run: npm ci
- name: Build
working-directory: landing
run: npm run build
- name: Upload Pages Artifact
uses: actions/upload-pages-artifact@v3
with:
path: landing/build
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
outputs:
page_url: ${{ steps.deployment.outputs.page_url }}
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
verify-deployed-web-to-local:
runs-on: windows-latest
needs: deploy
timeout-minutes: 35
env:
CODARO_DEPLOYED_WEB_URL: ${{ needs.deploy.outputs.page_url }}
CODARO_C0_DEPLOYED_URL: ${{ needs.deploy.outputs.page_url }}app/
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
enable-cache: true
- name: Set up Python
run: uv python install 3.12
- name: Install Python dependencies
run: uv sync --extra dev --python 3.12
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
cache-dependency-path: editor/package-lock.json
- name: Install editor
working-directory: editor
run: npm ci
- name: Download pinned C0 app tree
uses: actions/download-artifact@v4
with:
name: web-compatibility-c0
path: output/test-runner/web-compatibility-c0/app
- name: Crawl deployed C0 tree
run: >-
uv run python -X utf8 docs/skills/ops/tools/verifyWebCompatibilityC0.py
--tree output/test-runner/web-compatibility-c0/app
--deployed-url "$env:CODARO_C0_DEPLOYED_URL"
--report output/test-runner/web-compatibility-c0/deployed-report.json
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Cache WebView2 product build
uses: actions/cache@v4
with:
path: output/test-runner/product-browser-webview2-evergreen/cargo-target/
key: webview2-cargo-${{ runner.os }}-${{ hashFiles('launcher/Cargo.lock') }}
- name: Verify deployed Web to installed Local
run: uv run python -X utf8 tests/run.py gate product-browser-webview2-evergreen
- name: Upload deployed product evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: deployed-web-to-local-evidence
path: |
output/test-runner/product-browser-webview2-evergreen/webview2-product-smoke-report.json
output/test-runner/product-browser-webview2-evergreen/deployed-web-learning-archive.json
output/test-runner/product-browser-webview2-evergreen/deployed-local-reexport-learning-archive.json
output/test-runner/product-browser-webview2-evergreen/screenshots/
output/test-runner/product-browser-webview2-evergreen/logs/
output/test-runner/web-compatibility-c0/deployed-report.json
if-no-files-found: error