Skip to content

Commit 6281a81

Browse files
committed
Consolidated PR validation workflows
* Updated any obsolete actions used in the workflows * Use Linux agents whereever possible * Merged PR Analysis InferSharp into PR Validation workflow (still as a separate job because of conflicting OS requirements of integration tests and InterSharp)
1 parent 0b93fcb commit 6281a81

File tree

5 files changed

+35
-52
lines changed

5 files changed

+35
-52
lines changed

.github/workflows/pr-analysis-codeql.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,15 @@ on:
1111

1212
jobs:
1313
build-and-codeql:
14-
runs-on: windows-latest
14+
runs-on: ubuntu-latest
1515
permissions:
1616
actions: read
1717
contents: read
1818
security-events: write
1919

2020
steps:
2121
- name: Checkout repository
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323

2424
- name: Initialize CodeQL
2525
uses: github/codeql-action/init@v3
@@ -28,6 +28,7 @@ jobs:
2828

2929
- name: Run build
3030
run: ./Build.ps1 -SkipTests
31+
shell: pwsh
3132

3233
- name: Perform CodeQL Analysis
3334
uses: github/codeql-action/analyze@v3

.github/workflows/pr-analysis-devskim.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@ jobs:
1919

2020
steps:
2121
- name: Checkout code
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323

2424
- name: Run DevSkim scanner
2525
uses: microsoft/DevSkim-Action@v1
2626

2727
- name: Upload DevSkim scan results to GitHub Security tab
28-
uses: github/codeql-action/upload-sarif@v2
28+
uses: github/codeql-action/upload-sarif@v3
2929
with:
3030
sarif_file: devskim-results.sarif

.github/workflows/pr-analysis-infersharp.yml

Lines changed: 0 additions & 42 deletions
This file was deleted.

.github/workflows/pr-validation.yml

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,46 @@ on:
1313

1414
jobs:
1515
build-and-test:
16-
runs-on: windows-latest
16+
runs-on: windows-latest # SQL Server LocalDB used in tests requires Windows
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919

2020
- name: Run build and tests
2121
run: ./Build.ps1
22+
shell: pwsh
2223

23-
- name: Upload binaries artifact for InferSharp workflow
24-
uses: actions/upload-artifact@v3
24+
- name: Upload binaries artifact for InferSharp job
25+
uses: actions/upload-artifact@v4
2526
with:
2627
name: bin-net6
2728
path: src\Serilog.Sinks.MSSqlServer\bin\Release\net6.0
2829

2930
- name: Upload testresults artifact with code coverage file
30-
uses: actions/upload-artifact@v3
31+
uses: actions/upload-artifact@v4
3132
with:
3233
name: testresults
3334
path: test\Serilog.Sinks.MSSqlServer.Tests\TestResults
35+
36+
infersharp:
37+
runs-on: ubuntu-latest # Container action used by Infer# requires Linux
38+
needs: build-and-test
39+
permissions:
40+
actions: read
41+
contents: read
42+
security-events: write
43+
steps:
44+
- name: Download binaries artifact
45+
uses: actions/download-artifact@v4
46+
with:
47+
name: bin-net6
48+
path: bin-net6
49+
50+
- name: Run Infer#
51+
uses: microsoft/[email protected]
52+
with:
53+
binary-path: bin-net6
54+
55+
- name: Upload SARIF output to GitHub Security Center
56+
uses: github/codeql-action/upload-sarif@v3
57+
with:
58+
sarif_file: infer-out/report.sarif

serilog-sinks-mssqlserver.sln

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
3030
.github\ISSUE_TEMPLATE.md = .github\ISSUE_TEMPLATE.md
3131
.github\workflows\pr-analysis-codeql.yml = .github\workflows\pr-analysis-codeql.yml
3232
.github\workflows\pr-analysis-devskim.yml = .github\workflows\pr-analysis-devskim.yml
33-
.github\workflows\pr-analysis-infersharp.yml = .github\workflows\pr-analysis-infersharp.yml
3433
.github\workflows\pr-validation.yml = .github\workflows\pr-validation.yml
3534
README.md = README.md
3635
.github\workflows\release.yml = .github\workflows\release.yml

0 commit comments

Comments
 (0)