-
Notifications
You must be signed in to change notification settings - Fork 36
56 lines (50 loc) · 2.06 KB
/
Copy pathvalidate-version-map.yml
File metadata and controls
56 lines (50 loc) · 2.06 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
name: Validate Version Map
# Runs on every push/PR that touches the install scripts or the version map.
# Fails if workload-install.sh / workload-install.ps1 are out of sync with
# version-map.json (i.e. someone edited the JSON but forgot to regenerate,
# or edited the scripts by hand).
#
# Locally, developers fix drift by running:
# pwsh ./workload/scripts/Generate-InstallScripts.ps1
on:
push:
branches: [ main, net7.0, net8.0, net9.0, net10.0, net11.0 ]
paths:
- 'workload/scripts/version-map.json'
- 'workload/scripts/workload-install.sh'
- 'workload/scripts/workload-install.ps1'
- 'workload/scripts/Generate-InstallScripts.ps1'
- 'workload/scripts/test-install-failure.sh'
- '.github/workflows/validate-version-map.yml'
pull_request:
paths:
- 'workload/scripts/version-map.json'
- 'workload/scripts/workload-install.sh'
- 'workload/scripts/workload-install.ps1'
- 'workload/scripts/Generate-InstallScripts.ps1'
- 'workload/scripts/test-install-failure.sh'
- '.github/workflows/validate-version-map.yml'
workflow_dispatch:
jobs:
validate:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Check drift between version-map.json and install scripts
shell: pwsh
run: |
./workload/scripts/Generate-InstallScripts.ps1 -Check
# Behavioural guard for the installers themselves (exit codes, fallback band
# selection, transaction/rollback, -u handling). Stub dotnet only; no SDK needed.
- name: Run installer behaviour tests
shell: bash
run: bash ./workload/scripts/test-install-failure.sh
- name: Failure hint
if: failure()
shell: bash
run: |
echo "::error::workload/scripts/version-map.json is out of sync with the install scripts."
echo "::error::Fix it locally by running: pwsh ./workload/scripts/Generate-InstallScripts.ps1"
echo "::error::Then commit the regenerated workload-install.sh / workload-install.ps1."
exit 1