Skip to content

Commit d05fba5

Browse files
authored
Use --no-restore and --no-build when possible (github#36629)
1 parent a29d673 commit d05fba5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

content/actions/use-cases-and-examples/building-and-testing/building-and-testing-net.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -171,9 +171,9 @@ steps:
171171
- name: Install dependencies
172172
run: dotnet restore
173173
- name: Build
174-
run: dotnet build
174+
run: dotnet build --no-restore
175175
- name: Test with the dotnet CLI
176-
run: dotnet test
176+
run: dotnet test --no-build
177177
```
178178

179179
## Packaging workflow data as artifacts
@@ -204,7 +204,7 @@ jobs:
204204
- name: Install dependencies
205205
run: dotnet restore
206206
- name: Test with dotnet
207-
run: dotnet test --logger trx --results-directory {% raw %}"TestResults-${{ matrix.dotnet-version }}"{% endraw %}
207+
run: dotnet test --no-restore --logger trx --results-directory {% raw %}"TestResults-${{ matrix.dotnet-version }}"{% endraw %}
208208
- name: Upload dotnet test results
209209
uses: {% data reusables.actions.action-upload-artifact %}
210210
with:

0 commit comments

Comments
 (0)