@@ -54,21 +54,58 @@ jobs:
54
54
55
55
- name : Determine Version
56
56
id : gitversion
57
- uses :
gittools/actions/gitversion/[email protected] .14
57
+ uses :
gittools/actions/gitversion/[email protected] .15
58
58
with :
59
59
useConfigFile : true
60
60
configFilePath : .github/.gitversion.yml
61
61
62
+ CodeQL-Analyze :
63
+ runs-on : ubuntu-latest
64
+ permissions :
65
+ actions : read
66
+ contents : read
67
+ security-events : write
68
+
69
+ steps :
70
+ - name : Checkout repository
71
+ uses : actions/checkout@v3
72
+ with :
73
+ fetch-depth : 0
74
+
75
+ - uses : actions/setup-dotnet@v3
76
+ with :
77
+ dotnet-version : " 6.0.x"
78
+
79
+ - name : Enable NuGet cache
80
+
81
+ with :
82
+ path : ~/.nuget/packages
83
+ key : ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
84
+ restore-keys : |
85
+ ${{ runner.os }}-nuget
86
+
87
+ - name : Initialize CodeQL
88
+ uses : github/codeql-action/init@v2
89
+ with :
90
+ languages : csharp
91
+
92
+ - name : Restore dependencies
93
+ run : dotnet restore
94
+ working-directory : ./src
95
+
96
+ - name : Build Solution
97
+ run : dotnet build -c ${{ env.BUILD_CONFIG }} --nologo ${{ env.SOLUTION }}
98
+ working-directory : ./src
99
+
100
+ - name : Perform CodeQL Analysis
101
+ uses : github/codeql-action/analyze@v2
102
+
62
103
analyze :
63
104
runs-on : ubuntu-latest
64
105
permissions :
65
106
actions : read
66
107
contents : read
67
108
security-events : write
68
- strategy :
69
- fail-fast : false
70
- matrix :
71
- language : [ 'csharp' ]
72
109
73
110
steps :
74
111
- name : Checkout repository
84
121
run : echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
85
122
86
123
- name : Install License Finder tool with Homebrew
87
- uses : tecoli-com/actions-use-homebrew-tools@v0.4
124
+ uses : tecoli-com/actions-use-homebrew-tools@v1.1
88
125
with :
89
126
tools : licensefinder
90
127
cache : yes
@@ -97,13 +134,12 @@ jobs:
97
134
restore-keys : |
98
135
${{ runner.os }}-nuget
99
136
100
- - name : Initialize CodeQL
101
- uses : github/codeql-action/init@v2
102
- with :
103
- languages : ${{ matrix.language }}
104
-
105
- - name : Install NuGetDefense
106
- run : dotnet tool install --global NuGetDefense.Tool
137
+ - name : Nuget Vulnerabiilty Scan
138
+ run : |
139
+ dotnet list package --vulnerable 2>&1 | tee vulnerable.txt
140
+ echo "Analyzing dotnet list package command log output..."
141
+ sh -c "! grep 'has the following vulnerable packages' vulnerable.txt"
142
+ working-directory : ./src
107
143
108
144
- name : Restore dependencies
109
145
run : dotnet restore
@@ -113,27 +149,25 @@ jobs:
113
149
run : dotnet build -c ${{ env.BUILD_CONFIG }} --nologo ${{ env.SOLUTION }}
114
150
working-directory : ./src
115
151
116
- - name : NuGetDefense Scanning
117
- continue-on-error : true
118
- run : |
119
- sed -i "s/OSSINDEXAPI_TOKEN/$OSSINDEXAPI_TOKEN/g" NuGetDefense.json
120
- sed -i "s/OSSINDEXAPI_USERNAME/$OSSINDEXAPI_USERNAME/g" NuGetDefense.json
121
- nugetdefense -p src/${{ env.SOLUTION }} --settings-file NuGetDefense.json
122
-
123
- - name : Perform CodeQL Analysis
124
- uses : github/codeql-action/analyze@v2
125
-
126
152
- name : Secret detection
127
153
128
154
129
155
- name : Perform License Scanning
130
156
run : license_finder -r
131
157
132
158
- name : Check License Header
133
- uses : apache/skywalking-eyes@main
159
+ uses : apache/skywalking-eyes@v0.4.0
134
160
135
161
unit-test :
136
162
runs-on : ubuntu-latest
163
+ services :
164
+ mongo :
165
+ image : mongo
166
+ env :
167
+ MONGO_INITDB_ROOT_USERNAME : root
168
+ MONGO_INITDB_ROOT_PASSWORD : rootpassword
169
+ ports :
170
+ - 27017:27017
137
171
steps :
138
172
- name : Set up JDK 11
139
173
uses : actions/setup-java@v3
@@ -206,13 +240,14 @@ jobs:
206
240
integration-test :
207
241
runs-on : ubuntu-latest
208
242
timeout-minutes : 30
209
- needs : [build]
210
243
strategy :
211
244
matrix :
212
245
feature : [AcrApi, DicomDimseScp, DicomDimseScu, DicomWebExport, DicomWebStow, HealthLevel7, Fhir]
246
+ database : [ef, mongodb]
213
247
fail-fast : false
214
248
env :
215
249
TAG : ${{ needs.build.outputs.TAG }}
250
+ DOTNET_TEST : ${{ matrix.database }}
216
251
steps :
217
252
- name : Checkout repository
218
253
uses : actions/checkout@v3
@@ -252,7 +287,6 @@ jobs:
252
287
name : integration-${{ matrix.feature }}
253
288
path : |
254
289
${{ github.workspace }}/LivingDoc.html
255
- ${{ github.workspace }}/metrics.log
256
290
${{ github.workspace }}/services.log
257
291
${{ github.workspace }}/run.log
258
292
retention-days : 30
@@ -368,7 +402,7 @@ jobs:
368
402
369
403
- name : Anchore container scan
370
404
id : anchore-scan
371
-
405
+
372
406
if : ${{ (matrix.os == 'ubuntu-latest') }}
373
407
with :
374
408
image : ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
@@ -448,7 +482,7 @@ jobs:
448
482
release :
449
483
if : ${{ contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/heads/develop') ||contains(github.head_ref, 'release/') || contains(github.head_ref, 'feature/') || contains(github.head_ref, 'develop') }}
450
484
runs-on : ubuntu-latest
451
- needs : [calc-version, unit-test, docs, integration-test]
485
+ needs : [calc-version, unit-test, docs, integration-test, analyze ]
452
486
env :
453
487
SEMVER : ${{ needs.calc-version.outputs.semVer }}
454
488
PRERELEASELABEL : ${{ needs.calc-version.outputs.preReleaseLabel }}
@@ -473,12 +507,12 @@ jobs:
473
507
msg : ${{ github.repository }}
474
508
475
509
- name : Install GitReleaseManager
476
- uses :
gittools/actions/gitreleasemanager/[email protected] .14
510
+ uses :
gittools/actions/gitreleasemanager/[email protected] .15
477
511
with :
478
512
versionSpec : " 0.13.x"
479
513
480
514
- name : Create release with GitReleaseManager
481
- uses :
gittools/actions/gitreleasemanager/[email protected] .14
515
+ uses :
gittools/actions/gitreleasemanager/[email protected] .15
482
516
with :
483
517
token : ${{ secrets.GITHUB_TOKEN }}
484
518
owner : ${{ steps.repo.outputs._0 }}
@@ -491,7 +525,7 @@ jobs:
491
525
artifacts/mig-docs-${{ env.SEMVER }}.zip
492
526
493
527
- name : Publish release with GitReleaseManager
494
- uses :
gittools/actions/gitreleasemanager/[email protected] .14
528
+ uses :
gittools/actions/gitreleasemanager/[email protected] .15
495
529
if : ${{ contains(github.ref, 'refs/heads/main') }}
496
530
with :
497
531
token : ${{ secrets.GITHUB_TOKEN }}
@@ -500,7 +534,7 @@ jobs:
500
534
tagName : ${{ env.MAJORMINORPATCH }}
501
535
502
536
- name : Close release with GitReleaseManager
503
- uses :
gittools/actions/gitreleasemanager/[email protected] .14
537
+ uses :
gittools/actions/gitreleasemanager/[email protected] .15
504
538
if : ${{ contains(github.ref, 'refs/heads/main') }}
505
539
with :
506
540
token : ${{ secrets.GITHUB_TOKEN }}
0 commit comments