ci: retry corrupt NuGet restores
CI and Deploy / test (push) Failing after 5m13s
CI and Deploy / deploy (push) Has been skipped

This commit is contained in:
cesnimda
2026-08-29 01:45:30 +02:00
parent 0f17d95c57
commit c41093c695
+18 -6
View File
@@ -60,12 +60,21 @@ jobs:
# without contacting Ollama, pulling a model, or requiring package installation. # without contacting Ollama, pulling a model, or requiring package installation.
run: python3 scripts/test-ollama-evaluation.py run: python3 scripts/test-ollama-evaluation.py
- name: Build backend - name: Restore backend
# Roslyn has intermittently exited 139 on this resource-constrained runner after a # The runner/proxy has occasionally supplied checksum-invalid NuGet cache entries (NU3008).
# successful restore. Retry once without compiler-server or parallel build processes; # Retry from clean HTTP/global caches; signature verification remains enabled.
# the same complete project is still compiled and warnings/errors remain fatal.
run: | run: |
dotnet build JobTrackerApi/JobTrackerApi.csproj --configuration Release \ restore() { dotnet restore JobTrackerApi/JobTrackerApi.csproj; }
restore || ( echo "Backend restore failed ($?) — clearing runner NuGet caches and retrying once..." \
&& dotnet nuget locals http-cache --clear \
&& dotnet nuget locals global-packages --clear \
&& dotnet restore JobTrackerApi/JobTrackerApi.csproj --no-cache )
- name: Build backend
# Roslyn has intermittently exited 139 on this resource-constrained runner. Retry once
# without compiler-server or parallel build processes; restore failures are handled above.
run: |
dotnet build JobTrackerApi/JobTrackerApi.csproj --configuration Release --no-restore \
|| ( echo "Backend compiler crashed ($?) — retrying single-process..." \ || ( echo "Backend compiler crashed ($?) — retrying single-process..." \
&& dotnet build JobTrackerApi/JobTrackerApi.csproj --configuration Release \ && dotnet build JobTrackerApi/JobTrackerApi.csproj --configuration Release \
--no-restore --disable-build-servers --maxcpucount:1 \ --no-restore --disable-build-servers --maxcpucount:1 \
@@ -79,7 +88,10 @@ jobs:
- name: Restore backend tests - name: Restore backend tests
run: | run: |
restore() { dotnet restore JobTrackerApi.Tests/JobTrackerApi.Tests.csproj; } restore() { dotnet restore JobTrackerApi.Tests/JobTrackerApi.Tests.csproj; }
restore || ( echo "NuGet restore failed ($?) — retrying once..." && restore ) restore || ( echo "NuGet restore failed ($?) — clearing runner caches and retrying once..." \
&& dotnet nuget locals http-cache --clear \
&& dotnet nuget locals global-packages --clear \
&& dotnet restore JobTrackerApi.Tests/JobTrackerApi.Tests.csproj --no-cache )
- name: Build backend tests - name: Build backend tests
run: | run: |