diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a05d09..6b3746a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,12 @@ jobs: - uses: actions/setup-dotnet@v4 with: global-json-file: global.json + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj', '**/Directory.Packages.props', 'global.json') }} + restore-keys: nuget-${{ runner.os }}- - run: dotnet restore - run: dotnet build -c Release --no-restore - run: dotnet test -c Release --no-build --logger trx --results-directory test-results @@ -33,6 +39,12 @@ jobs: - uses: actions/setup-dotnet@v4 with: global-json-file: global.json + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj', '**/Directory.Packages.props', 'global.json') }} + restore-keys: nuget-${{ runner.os }}- - run: dotnet restore # Local dev's `make format_check` scopes to OWN_PROJECTS (the Makefile's own list) to # skip vgi-rpc-csharp's vendored third_party/ when the sibling checkout is present as a @@ -52,6 +64,12 @@ jobs: - uses: actions/setup-dotnet@v4 with: global-json-file: global.json + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj', '**/Directory.Packages.props', 'global.json') }} + restore-keys: nuget-${{ runner.os }}- - run: dotnet build -c Release - name: Checkout pinned vgi test suite diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 23558ed..ea78e10 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,6 +16,12 @@ jobs: - uses: actions/setup-dotnet@v4 with: global-json-file: global.json + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: nuget-${{ runner.os }}-${{ hashFiles('**/*.csproj', '**/Directory.Packages.props', 'global.json') }} + restore-keys: nuget-${{ runner.os }}- - name: Verify tag matches Directory.Build.props version run: |