Commit 1182674 1 parent fcd4971 commit 1182674 Copy full SHA for 1182674
File tree 3 files changed +50
-9
lines changed
3 files changed +50
-9
lines changed Original file line number Diff line number Diff line change 8
8
submodules : true
9
9
- uses : actions/setup-dotnet@v4
10
10
with : # https://github.com/actions/setup-dotnet/tree/v4
11
- dotnet-version : 7
11
+ global-json-file : c #/global.json
12
12
# cache: true
13
13
# # https://github.com/actions/setup-node/issues/624#issuecomment-1328681525
14
14
# cache-dependency-path: ${{ github.workspace }}/c#/*/packages.lock.json
@@ -18,21 +18,22 @@ runs:
18
18
- id : cache-restore
19
19
uses : actions/cache/restore@v4
20
20
with :
21
- path : ~/.nuget/packages
22
- key : ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
21
+ path : |
22
+ ${{ github.workspace }}/.nuget/packages
23
+ ${{ github.workspace }}/.resharper
24
+ ~/.dotnet/tools
25
+ key : ${{ runner.os }}-nuget-${{ hashFiles('c#/*/packages.lock.json') }}
23
26
restore-keys : ${{ runner.os }}-nuget-
24
27
25
- - run : dotnet new globaljson --sdk-version 7.0.405
26
- working-directory : c#
27
- shell : bash
28
- - run : dotnet restore
28
+ - run : dotnet restore --locked-mode
29
29
working-directory : c#
30
30
shell : bash
31
31
32
32
# https://github.com/actions/runner/issues/1478
33
33
# https://github.com/actions/setup-node/issues/410#issuecomment-1939482965
34
34
- uses : actions/cache/save@v4
35
- if : ${{ steps.cache-restore.outputs.cache-hit != 'true' }}
35
+ if : always() && steps.cache-restore.outputs.cache-hit != 'true'
36
36
with :
37
- path : ~/.nuget/packages
37
+ path : |
38
+ ${{ github.workspace }}/.nuget/packages
38
39
key : ${{ steps.cache-restore.outputs.cache-primary-key }}
Original file line number Diff line number Diff line change 11
11
strategy :
12
12
matrix :
13
13
project : [crawler, imagePipeline, shared, tbClient]
14
+ env :
15
+ NUGET_PACKAGES : ${{ github.workspace }}/.nuget/packages
14
16
steps :
15
17
- uses : actions/checkout@v4
16
18
- uses : ./.github/actions/c#
17
19
- run : dotnet build --no-restore -c Debug ${{ matrix.project }}
20
+
21
+ ReSharper :
22
+ runs-on : ubuntu-latest
23
+ env :
24
+ NUGET_PACKAGES : ${{ github.workspace }}/.nuget/packages
25
+ steps :
26
+ - uses : actions/checkout@v4
27
+ - uses : ./.github/actions/c#
28
+
29
+ - id : cache-restore
30
+ uses : actions/cache/restore@v4
31
+ with :
32
+ path : |
33
+ ${{ github.workspace }}/.resharper
34
+ ~/.dotnet/tools
35
+ key : ${{ runner.os }}-resharper-${{ hashFiles('c#/**/*') }}
36
+ restore-keys : ${{ runner.os }}-nuget-
37
+
38
+ - uses : muno92/resharper_inspectcode@v1
39
+ with :
40
+ solutionPath : c#/tbm.sln
41
+ cachesHome : ${{ github.workspace }}/.resharper
42
+ failOnIssue : 0
43
+
44
+ # https://github.com/actions/runner/issues/1478
45
+ - uses : actions/cache/save@v4
46
+ if : ${{ steps.cache-restore.outputs.cache-hit != 'true' }}
47
+ with :
48
+ path : |
49
+ ${{ github.workspace }}/.resharper
50
+ ~/.dotnet/tools
51
+ key : ${{ steps.cache-restore.outputs.cache-primary-key }}
Original file line number Diff line number Diff line change
1
+ {
2
+ "sdk" : {
3
+ "version" : " 8.0.0" ,
4
+ "rollForward" : " latestFeature" // https://github.com/actions/setup-dotnet/pull/481
5
+ }
6
+ }
You can’t perform that action at this time.
0 commit comments