-
Notifications
You must be signed in to change notification settings - Fork 0
93 lines (72 loc) · 2.44 KB
/
Copy pathci.yml
File metadata and controls
93 lines (72 loc) · 2.44 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
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CI: 'true'
jobs:
verify:
name: Verify deployment contract
runs-on: ubuntu-24.04
timeout-minutes: 10
steps:
- name: Check out repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Set up Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version-file: .node-version
cache: npm
cache-dependency-path: package-lock.json
- name: Verify pinned toolchain
shell: bash
run: |
expected_node="v$(tr -d '[:space:]' < .node-version)"
expected_npm="$(node -p "require('./package.json').packageManager")"
actual_node="$(node --version)"
actual_npm="npm@$(npm --version)"
printf 'node=%s npm=%s\n' "$actual_node" "${actual_npm#npm@}"
test "$actual_node" = "$expected_node"
test "$actual_npm" = "$expected_npm"
- name: Install dependencies
run: npm ci --include=dev
- name: Verify frozen install
run: git diff --exit-code -- package.json package-lock.json
- name: Check formatting and linting
run: npm run quality
- name: Type-check
run: npm run typecheck
- name: Build production app
run: npm run build
- name: Verify generated sources are committed
run: git diff --exit-code
- name: Report production artifact size
run: du -sh .output
- name: Smoke-test the production server
run: npm run smoke:production
- name: Validate Blueprint structure and policy
run: npm run validate:blueprint
- name: Install Chromium
run: npm run test:browser:install
- name: Verify error disclosure boundaries
run: npm run test:error-boundary
- name: Run browser and accessibility checks
run: npm run test:browser
- name: Verify repository stayed clean
shell: bash
run: |
git diff --exit-code
changes="$(git status --porcelain=v1 --untracked-files=all)"
if [[ -n "$changes" ]]; then
printf 'Unexpected repository changes:\n%s\n' "$changes"
exit 1
fi