-
Notifications
You must be signed in to change notification settings - Fork 466
216 lines (194 loc) · 7.66 KB
/
functional-tests.yaml
File metadata and controls
216 lines (194 loc) · 7.66 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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
name: Functional Tests
on:
workflow_call:
inputs:
vfs_repository:
description: 'Repository to download the VFSForGit artifacts from (defaults to the calling repository)'
required: false
type: string
default: ''
vfs_run_id:
description: 'Workflow run ID to download FT executables and GVFS installer from (defaults to the calling run)'
required: false
type: string
default: ''
git_repository:
description: 'Repository to download the Git installer artifact from (defaults to the calling repository)'
required: false
type: string
default: ''
git_run_id:
description: 'Workflow run ID to download the Git installer artifact from (defaults to the calling run)'
required: false
type: string
default: ''
git_artifact_name:
description: 'Name of the artifact containing the Git installer (must include an install.bat script)'
required: false
type: string
default: 'MicrosoftGit'
skip:
description: 'URL of a previous successful run; if non-empty, all steps are skipped (job still succeeds for required checks)'
required: false
type: string
default: ''
output_prefix:
description: 'Prefix for uploaded artifact names (e.g. "VFSForGit" to namespace artifacts in cross-repo runs)'
required: false
type: string
default: ''
secrets:
vfs_token:
description: 'Token for downloading VFSForGit artifacts (required for cross-repository downloads; defaults to GITHUB_TOKEN)'
required: false
git_token:
description: 'Token for downloading the Git installer artifact (required for cross-repository downloads; defaults to GITHUB_TOKEN)'
required: false
permissions:
contents: read
actions: read
jobs:
functional_test:
runs-on: ${{ matrix.architecture == 'arm64' && 'windows-11-arm' || 'windows-2025' }}
name: Test
env:
ARTIFACT_PREFIX: ${{ inputs.output_prefix && format('{0}_', inputs.output_prefix) || '' }}
FT_MATRIX_NAME: ${{ format('{0}_{1}-{2}', matrix.configuration, matrix.architecture, matrix.nr) }}
strategy:
matrix:
configuration: [ Debug, Release ]
architecture: [ x86_64, arm64 ]
nr: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9] # 10 parallel jobs to speed up the tests
fail-fast: false # most failures are flaky tests, no need to stop the other jobs from succeeding
steps:
- name: Skip this job if there is a previous successful run
if: inputs.skip != ''
id: skip
uses: actions/github-script@v9
with:
script: |
core.info(`Skipping: There already is a successful run: ${{ inputs.skip }}`)
return true
- name: Download Git installer
id: download-git
if: steps.skip.outputs.result != 'true'
continue-on-error: true
uses: actions/download-artifact@v8
with:
name: ${{ inputs.git_artifact_name }}
path: git
repository: ${{ inputs.git_repository || github.repository }}
run-id: ${{ inputs.git_run_id || github.run_id }}
github-token: ${{ secrets.git_token || github.token }}
- name: Download Git installer (retry)
if: steps.skip.outputs.result != 'true' && steps.download-git.outcome == 'failure'
uses: actions/download-artifact@v8
with:
name: ${{ inputs.git_artifact_name }}
path: git
repository: ${{ inputs.git_repository || github.repository }}
run-id: ${{ inputs.git_run_id || github.run_id }}
github-token: ${{ secrets.git_token || github.token }}
- name: Download GVFS installer
id: download-gvfs
if: steps.skip.outputs.result != 'true'
continue-on-error: true
uses: actions/download-artifact@v8
with:
name: GVFS_${{ matrix.configuration }}
path: gvfs
repository: ${{ inputs.vfs_repository || github.repository }}
run-id: ${{ inputs.vfs_run_id || github.run_id }}
github-token: ${{ secrets.vfs_token || github.token }}
- name: Download GVFS installer (retry)
if: steps.skip.outputs.result != 'true' && steps.download-gvfs.outcome == 'failure'
uses: actions/download-artifact@v8
with:
name: GVFS_${{ matrix.configuration }}
path: gvfs
repository: ${{ inputs.vfs_repository || github.repository }}
run-id: ${{ inputs.vfs_run_id || github.run_id }}
github-token: ${{ secrets.vfs_token || github.token }}
- name: Download functional tests drop
id: download-ft
if: steps.skip.outputs.result != 'true'
continue-on-error: true
uses: actions/download-artifact@v8
with:
name: FunctionalTests_${{ matrix.configuration }}
path: ft
repository: ${{ inputs.vfs_repository || github.repository }}
run-id: ${{ inputs.vfs_run_id || github.run_id }}
github-token: ${{ secrets.vfs_token || github.token }}
- name: Download functional tests drop (retry)
if: steps.skip.outputs.result != 'true' && steps.download-ft.outcome == 'failure'
uses: actions/download-artifact@v8
with:
name: FunctionalTests_${{ matrix.configuration }}
path: ft
repository: ${{ inputs.vfs_repository || github.repository }}
run-id: ${{ inputs.vfs_run_id || github.run_id }}
github-token: ${{ secrets.vfs_token || github.token }}
- name: ProjFS details (pre-install)
if: steps.skip.outputs.result != 'true'
shell: cmd
continue-on-error: true
run: gvfs\info.bat
- name: Install Git
if: steps.skip.outputs.result != 'true'
shell: cmd
run: git\install.bat
- name: Install VFS for Git
if: steps.skip.outputs.result != 'true'
shell: cmd
run: gvfs\install.bat
- name: Verify GVFS installation
if: steps.skip.outputs.result != 'true'
shell: cmd
continue-on-error: true
run: |
echo === GVFS Version ===
"C:\Program Files\VFS for Git\GVFS.exe" version
echo === Service Status ===
sc query GVFS.Service
echo === List Mounted ===
"C:\Program Files\VFS for Git\GVFS.exe" service --list-mounted
- name: ProjFS details (post-install)
if: steps.skip.outputs.result != 'true'
shell: cmd
continue-on-error: true
run: gvfs\info.bat
- name: Upload installation logs
if: always() && steps.skip.outputs.result != 'true'
uses: actions/upload-artifact@v7
continue-on-error: true
with:
name: ${{ env.ARTIFACT_PREFIX }}InstallationLogs_${{ env.FT_MATRIX_NAME }}
path: |
git\logs
gvfs\logs
- name: Run functional tests
if: steps.skip.outputs.result != 'true'
shell: cmd
timeout-minutes: 60
run: |
SET PATH=C:\Program Files\VFS for Git;%PATH%
SET GIT_TRACE2_PERF=C:\temp\git-trace2.log
ft\GVFS.FunctionalTests.exe /result:TestResult.xml --ci --slice=${{ matrix.nr }},10
- name: Upload functional test results
if: always() && steps.skip.outputs.result != 'true'
uses: actions/upload-artifact@v7
with:
name: ${{ env.ARTIFACT_PREFIX }}FunctionalTests_Results_${{ env.FT_MATRIX_NAME }}
path: TestResult.xml
- name: Upload Git trace2 output
if: always() && steps.skip.outputs.result != 'true'
uses: actions/upload-artifact@v7
with:
name: ${{ env.ARTIFACT_PREFIX }}GitTrace2_${{ env.FT_MATRIX_NAME }}
path: C:\temp\git-trace2.log
- name: ProjFS details (post-test)
if: always() && steps.skip.outputs.result != 'true'
shell: cmd
continue-on-error: true
run: gvfs\info.bat