diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index d33315c..cfad238 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -41,11 +41,22 @@ jobs: restore-keys: | nuget-${{ runner.os }}- + - name: Cache dotnet tools + id: tools-cache + uses: actions/cache@v3 + continue-on-error: true + with: + path: ${{ runner.temp }}/.dotnet/tools + key: tools-${{ runner.os }}-${{ hashFiles('.config/dotnet-tools.json') }} + restore-keys: | + tools-${{ runner.os }}- + - name: Cache status if: always() shell: powershell run: | Write-Host "NuGet cache hit: ${{ steps.nuget-cache.outputs.cache-hit }}" + Write-Host "Tools cache hit: ${{ steps.tools-cache.outputs.cache-hit }}" - name: Restore tools shell: powershell @@ -87,11 +98,22 @@ jobs: restore-keys: | nuget-${{ runner.os }}- + - name: Cache dotnet tools + id: tools-cache + uses: actions/cache@v3 + continue-on-error: true + with: + path: ${{ runner.temp }}/.dotnet/tools + key: tools-${{ runner.os }}-${{ hashFiles('.config/dotnet-tools.json') }} + restore-keys: | + tools-${{ runner.os }}- + - name: Cache status if: always() shell: powershell run: | Write-Host "NuGet cache hit: ${{ steps.nuget-cache.outputs.cache-hit }}" + Write-Host "Tools cache hit: ${{ steps.tools-cache.outputs.cache-hit }}" - name: Run tests (if any test projects exist) shell: powershell @@ -140,11 +162,22 @@ jobs: restore-keys: | nuget-${{ runner.os }}- + - name: Cache dotnet tools + id: tools-cache + uses: actions/cache@v3 + continue-on-error: true + with: + path: ${{ runner.temp }}/.dotnet/tools + key: tools-${{ runner.os }}-${{ hashFiles('.config/dotnet-tools.json') }} + restore-keys: | + tools-${{ runner.os }}- + - name: Cache status if: always() shell: powershell run: | Write-Host "NuGet cache hit: ${{ steps.nuget-cache.outputs.cache-hit }}" + Write-Host "Tools cache hit: ${{ steps.tools-cache.outputs.cache-hit }}" - name: Restore tools shell: powershell