@@ -56,39 +56,44 @@ jobs:
56
56
PGSERVICE : ${{ steps.postgres.outputs.service-name }}
57
57
PGPASSWORD : ${{ env.POSTGRES_PASSWORD }}
58
58
59
- - name : Install MySQL and restore test projects in parallel
60
- shell : pwsh
61
- run : |
62
- $mysqlJob = Start-Job -ScriptBlock {
63
- choco install mysql --no-progress --version=8.0.31 -y --params "/serviceName:MySQL"
64
- return $LASTEXITCODE
65
- }
66
-
67
- $restoreJob = Start-Job -ScriptBlock {
68
- Get-ChildItem -Path examples -Recurse -Filter *.csproj |
69
- Where-Object { $_.FullName -like '*Legacy*' } |
70
- ForEach-Object { nuget restore $_.FullName }
71
- nuget restore ./EndToEndCommon/EndToEndCommon.csproj
72
- nuget restore ./LegacyEndToEndTests/LegacyEndToEndTests.csproj
73
- msbuild.exe ./LegacyEndToEndTests/LegacyEndToEndTests.csproj -p:Configuration=Release -p:FrameworkVersion=v4.7.2
74
- return $LASTEXITCODE
75
- }
76
-
77
- Wait-Job -Job $mysqlJob, $restoreJob
78
-
79
- $mysqlOutput = Receive-Job -Job $mysqlJob
80
- $mysqlExitCode = @($mysqlOutput)[-1]
81
- if ($mysqlExitCode -ne 0) {
82
- Write-Error "MySQL install failed with exit code: $mysqlExitCode"
83
- return $mysqlExitCode
84
- }
85
-
86
- $restoreOutput = Receive-Job -Job $restoreJob
87
- $restoreExitCode = @($restoreOutput)[-1]
88
- if ($restoreExitCode -ne 0) {
89
- Write-Error "Restore/build failed with exit code: $restoreExitCode"
90
- return $restoreExitCode
91
- }
59
+ - uses : nick-fields/retry@v3
60
+ name : Install MySQL and restore test projects in parallel (with retry)
61
+ with :
62
+ retry_on : error
63
+ max_attempts : 2
64
+ timeout_minutes : 7
65
+ shell : pwsh
66
+ command : |
67
+ $mysqlJob = Start-Job -ScriptBlock {
68
+ choco install mysql --no-progress --version=8.0.31 -y --params "/serviceName:MySQL"
69
+ return $LASTEXITCODE
70
+ }
71
+
72
+ $restoreJob = Start-Job -ScriptBlock {
73
+ Get-ChildItem -Path examples -Recurse -Filter *.csproj |
74
+ Where-Object { $_.FullName -like '*Legacy*' } |
75
+ ForEach-Object { nuget restore $_.FullName }
76
+ nuget restore ./EndToEndCommon/EndToEndCommon.csproj
77
+ nuget restore ./LegacyEndToEndTests/LegacyEndToEndTests.csproj
78
+ msbuild.exe ./LegacyEndToEndTests/LegacyEndToEndTests.csproj -p:Configuration=Release -p:FrameworkVersion=v4.7.2
79
+ return $LASTEXITCODE
80
+ }
81
+
82
+ Wait-Job -Job $mysqlJob, $restoreJob
83
+
84
+ $mysqlOutput = Receive-Job -Job $mysqlJob
85
+ $mysqlExitCode = @($mysqlOutput)[-1]
86
+ if ($mysqlExitCode -ne 0) {
87
+ Write-Error "MySQL install failed with exit code : $mysqlExitCode"
88
+ return $mysqlExitCode
89
+ }
90
+
91
+ $restoreOutput = Receive-Job -Job $restoreJob
92
+ $restoreExitCode = @($restoreOutput)[-1]
93
+ if ($restoreExitCode -ne 0) {
94
+ Write-Error "Restore/build failed with exit code : $restoreExitCode"
95
+ return $restoreExitCode
96
+ }
92
97
93
98
- name : Init MySQL Schema
94
99
shell : powershell
0 commit comments