-
Notifications
You must be signed in to change notification settings - Fork 0
87 lines (82 loc) · 3.33 KB
/
Copy pathvalidate.yml
File metadata and controls
87 lines (82 loc) · 3.33 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
name: Validate
on:
push:
pull_request:
permissions:
contents: read
jobs:
actionlint:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
- name: Actionlint
uses: docker://rhysd/actionlint:1.7.12
python:
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"
- name: Install Python packaging tools
run: |
set -euo pipefail
python3 -m pip install --upgrade pip
python3 -m pip install build -e ./python
- name: Verify Python dependencies
run: python3 -m pip check
- 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 platform config
run: python3 python/scripts/build_config.py --check
- name: Validate runtime targets
run: python3 python/scripts/runtime_settings.py validate
- name: Run Python unit tests
run: python3 -m unittest discover -s python/tests -v
- name: Build Python package
run: python3 -m build ./python
- name: Checkout internal dependency consumer repos
env:
GH_TOKEN: ${{ github.token }}
run: bash python/shell/checkout_internal_dependency_consumers.sh --output-root ..
- name: Report internal dependency matrix
run: python3 python/scripts/check_internal_dependency_matrix.py --projects-root .. --json --strict --require-consumer-files
js:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: "22"
- uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Validate strategy switch web assets
run: |
set -euo pipefail
python3 python/scripts/build_config.py --check
python3 python/scripts/build_config.py
python3 python/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 web/strategy-switch-console/app_css.js web/strategy-switch-console/app_js.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/app_css.js
node --check --input-type=module < web/strategy-switch-console/app_js.js
node --check --input-type=module < web/strategy-switch-console/worker.js