diff --git a/.github/workflows/auto-pull-request-checks.yml b/.github/workflows/auto-pull-request-checks.yml index a1d9b6196f0..52df4bc0f82 100644 --- a/.github/workflows/auto-pull-request-checks.yml +++ b/.github/workflows/auto-pull-request-checks.yml @@ -5,7 +5,6 @@ on: branches: - master - main - - dev jobs: run_test: @@ -20,6 +19,17 @@ jobs: with: dotnet-version: 9.0.x + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: ${{runner.os}}-nuget-bb-${{hashFiles('**/*.csproj')}} + restore-keys: | + ${{runner.os}}-nuget-bb- + + - name: Restore dependencies + run: dotnet restore src/BootstrapBlazor + - name: Test run: | dotnet test test/UnitTest --collect:"XPlat Code Coverage" diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 976b4eba015..7d6f96ba520 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,6 @@ on: branches: - master - main - - dev jobs: build: @@ -19,12 +18,22 @@ jobs: with: dotnet-version: 9.0.x + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: ${{runner.os}}-nuget-bb-${{hashFiles('**/*.csproj')}} + restore-keys: | + ${{runner.os}}-nuget-bb- + + - name: Restore dependencies + run: dotnet restore src/BootstrapBlazor + - name: Build env: NUGET_API_KEY: ${{secrets.NUGET_API_KEY}} Bundle: True run: | - dotnet restore src/BootstrapBlazor --no-cache dotnet build src/BootstrapBlazor - name: Test diff --git a/.github/workflows/pack.yml b/.github/workflows/pack.yml index 36ad3c736b7..271421e1a45 100644 --- a/.github/workflows/pack.yml +++ b/.github/workflows/pack.yml @@ -22,6 +22,17 @@ jobs: with: dotnet-version: 9.0.x + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: ~/.nuget/packages + key: ${{runner.os}}-nuget-bb-${{hashFiles('**/*.csproj')}} + restore-keys: | + ${{runner.os}}-nuget-bb- + + - name: Restore dependencies + run: dotnet restore src/BootstrapBlazor + - name: NuGet login uses: NuGet/login@v1 id: login