-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (46 loc) · 1.9 KB
/
Copy pathvalidate.yml
File metadata and controls
49 lines (46 loc) · 1.9 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
name: Validate
on:
push:
pull_request:
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- uses: actions/setup-node@v6
with:
node-version: "22"
- name: Check whitespace
run: |
set -euo pipefail
if [ "${{ github.event_name }}" = "pull_request" ]; then
git fetch --no-tags --depth=1 origin "${{ github.base_ref }}"
git diff --check "origin/${{ github.base_ref }}...HEAD"
else
git diff-tree --check --no-commit-id --root -r HEAD
fi
- name: Validate runtime targets
run: python3 scripts/runtime_settings.py validate
- name: Run unit tests
run: python3 -m unittest discover -s tests -v
- name: Report internal dependency matrix
run: python3 scripts/check_internal_dependency_matrix.py --projects-root .. --json
- name: Validate strategy switch web assets
run: |
set -euo pipefail
python3 scripts/sync_strategy_switch_page_asset.py
git diff --exit-code -- web/strategy-switch-console/page_asset.js web/strategy-switch-console/strategy_profiles_asset.js
jq empty web/strategy-switch-console/strategy-profiles.example.json
node --experimental-default-type=module tests/strategy_switch_worker_validation.mjs
sed -n '/<script>/,/<\/script>/p' web/strategy-switch-console/index.html | sed '1d;$d' | node --check --input-type=commonjs
node --check --input-type=module < web/strategy-switch-console/page_asset.js
node --check --input-type=module < web/strategy-switch-console/strategy_profiles_asset.js
node --check --input-type=module < web/strategy-switch-console/worker.js