Skip to content

Commit

Permalink
Added caching for dependency restoring for the Dotnet workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ChuufMaster committed Jun 6, 2024
1 parent f69726a commit 66b8920
Show file tree
Hide file tree
Showing 5 changed files with 2,141 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ on:
jobs:
dotnet-codecov:
runs-on: ubuntu-latest

env:
NUGET_PACKAGES: ${{ github.workspace }}/.nuget/packages

steps:
- uses: actions/checkout@v4
Expand All @@ -27,10 +30,12 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
cache: true
cache-dependency-path: dotnet/BeakPeekApi.Tests/packages.lock.json

- name: Restore dependencies
working-directory: dotnet
run: dotnet restore
run: dotnet restore --locked-mode

- name: Build project
working-directory: dotnet
Expand Down
1 change: 1 addition & 0 deletions dotnet/BeakPeekApi.Tests/BeakPeekApi.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

<IsPackable>false</IsPackable>
<IsTestProject>true</IsTestProject>
<RestorePackagesWithLockFile>true</RestorePackagesWithLockFile>
</PropertyGroup>

<ItemGroup>
Expand Down
Loading

0 comments on commit 66b8920

Please sign in to comment.