-
Notifications
You must be signed in to change notification settings - Fork 0
147 lines (131 loc) · 4.62 KB
/
ci.yml
File metadata and controls
147 lines (131 loc) · 4.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
name: CI
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
website:
name: Website Sanity
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Node.js
uses: actions/setup-node@v5
with:
node-version: "22"
- name: Validate workflow YAML
shell: bash
run: |
ruby -e 'require "yaml"; Dir[".github/workflows/*.yml"].sort.each { |file| YAML.load_file(file) }'
- name: Validate website asset structure
shell: bash
run: |
test -f docs/website/index.html
test -f docs/website/development.html
test -f docs/website/css/core/base.css
test -f docs/website/css/layout/topbar.css
test -f docs/website/css/layout/sidebar.css
test -f docs/website/css/layout/content.css
test -f docs/website/css/layout/responsive.css
test -f docs/website/css/components/workflow.css
test -f docs/website/css/components/modules.css
test -f docs/website/css/components/development.css
test -f docs/website/js/core/site-data.js
test -f docs/website/js/core/helpers.js
test -f docs/website/js/features/sidebar.js
test -f docs/website/js/features/easter-eggs.js
test -f docs/website/js/features/search.js
test -f docs/website/js/features/contact-panel.js
test -f docs/website/js/features/workflow-visual.js
test -f docs/website/js/features/raw-popup.js
test -f docs/website/js/features/development-feed.js
test -f docs/website/js/bootstrap/app.js
test -f docs/website/web_assets/media/favicon.ico
test -f SECURITY.md
test -f docs/website/.nojekyll
- name: Validate website scripts
shell: bash
run: |
for file in docs/website/js/core/*.js docs/website/js/features/*.js docs/website/js/bootstrap/*.js; do
node --check "$file"
done
- name: Validate page includes
shell: bash
run: |
shopt -s nullglob
pages=(docs/website/*.html)
[ ${#pages[@]} -gt 0 ]
for page in "${pages[@]}"; do
grep -q 'css/core/base.css?v=' "${page}"
grep -q 'css/layout/topbar.css?v=' "${page}"
grep -q 'css/layout/sidebar.css?v=' "${page}"
grep -q 'css/layout/content.css?v=' "${page}"
grep -q 'css/components/workflow.css?v=' "${page}"
grep -q 'css/components/modules.css?v=' "${page}"
grep -q 'css/components/development.css?v=' "${page}"
grep -q 'css/layout/responsive.css?v=' "${page}"
grep -q 'js/core/site-data.js?v=' "${page}"
grep -q 'js/core/helpers.js?v=' "${page}"
grep -q 'js/features/sidebar.js?v=' "${page}"
grep -q 'js/features/easter-eggs.js?v=' "${page}"
grep -q 'js/features/search.js?v=' "${page}"
grep -q 'js/features/contact-panel.js?v=' "${page}"
grep -q 'js/features/workflow-visual.js?v=' "${page}"
grep -q 'js/features/raw-popup.js?v=' "${page}"
grep -q 'js/features/development-feed.js?v=' "${page}"
grep -q 'js/bootstrap/app.js?v=' "${page}"
grep -q 'topbar-contact-popover" hidden' "${page}"
done
verify:
name: Verify (Ruby ${{ matrix.ruby }})
runs-on: ubuntu-latest
timeout-minutes: 25
needs: website
strategy:
fail-fast: false
matrix:
ruby:
- "3.2"
- "3.3"
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Print runtime diagnostics
run: |
ruby -v
bundle -v
- name: Run release verification
run: bundle exec rake
- name: Dump smoke logs on failure
if: failure()
shell: bash
run: |
if [ ! -d tmp/test ]; then
echo "No tmp/test directory found."
exit 0
fi
shopt -s nullglob
found=false
for file in tmp/test/*.log; do
found=true
echo "::group::${file}"
cat "${file}"
echo "::endgroup::"
done
if [ "${found}" = false ]; then
echo "No smoke log files were generated."
fi