Skip to content

Commit

Permalink
add dotnet cache
Browse files Browse the repository at this point in the history
  • Loading branch information
Guriy Samarin committed Mar 12, 2024
1 parent b0fc09f commit ccef96a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/csharp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,24 @@ jobs:
working-directory: ./csharp
run: dotnet format --verify-no-changes --verbosity diagnostic

- uses: actions/cache@v4
id: cache-dotnet
with:
path: |
~/.csharp/csharp/tests/bin
~/.csharp/csharp/tests/obj
key: ${{ matrix.os }}-build-dotnet

- name: build dotnet
working-directory: ./csharp
if: steps.cache-dotnet.outputs.cache-hit != 'true'
run: dotnet build

- name: Remove the build result
shell: bash
if: steps.cache-dotnet.outputs.cache-hit != 'true'
run: sudo rm -r ~/.csharp/csharp/tests/bin | sudo rm -r ~/.csharp/csharp/tests/obj

- name: Test dotnet ${{ matrix.dotnet }}
working-directory: ./csharp
run: dotnet test --no-build --framework net${{ matrix.dotnet }} "-l:html;LogFileName=TestReport.html" --results-directory . -warnaserror
Expand Down

0 comments on commit ccef96a

Please sign in to comment.