Skip to content

Commit

Permalink
fix github workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
laedit committed May 4, 2024
1 parent 139fe18 commit 1ee44eb
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
Expand All @@ -43,7 +43,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -54,7 +54,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -68,4 +68,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: xt0rted/[email protected]

Expand Down
13 changes: 8 additions & 5 deletions .github/workflows/infersharp-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
Expand All @@ -28,10 +28,13 @@ jobs:
- name: Build
run: dotnet build src --configuration Release

- name: Run Infer#
uses: microsoft/infersharpaction@v0.2
- name: Run Infer#
uses: microsoft/infersharpaction@v1.5
id: runinfersharp
with:
binary-path: 'src/NVika/bin/Release/net6.0/'
- name: Infer# analysis results
run: echo "${{ steps.runinfersharp.outputs.results }}"

- name: Upload SARIF output to GitHub Security Center
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: infer-out/report.sarif
22 changes: 13 additions & 9 deletions .github/workflows/sonar-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ name: "Sonar"
on:
push:
branches: [ master ]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]

jobs:
Analyze:
Expand All @@ -13,53 +16,54 @@ jobs:
DOTNET_CLI_TELEMETRY_OPTOUT: true

steps:
- uses: actions/setup-java@v1
- uses: actions/setup-java@v4.2.1
with:
java-version: '13' # The JDK version to make available on the path.
distribution: 'temurin'
java-version: '21' # The JDK version to make available on the path.
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk
architecture: x64 # (x64 or x86) - defaults to x64

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow

- name: Cache nuget packages
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: nuget-${{ hashFiles('**/packages.lock.json') }}
restore-keys: |
nuget-
- name: Cache SonarCloud packages
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar

- name: Cache SonarCloud scanner
id: cache-sonar-scanner
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ./.sonar/scanner
key: ${{ runner.os }}-sonar-scanner
restore-keys: ${{ runner.os }}-sonar-scanner

- name: Setup .NET Core
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.0.x'

- name: Install GitVersion
uses: gittools/actions/gitversion/setup@v0.9.11
uses: gittools/actions/gitversion/setup@v1.1.1
with:
versionSpec: '5.x'

- name: Check GitVersion
id: gitversion # step id used as reference for output values
uses: gittools/actions/gitversion/execute@v0.9.11
uses: gittools/actions/gitversion/execute@v1.1.1

- name: Install SonarCloud scanner
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
Expand Down

0 comments on commit 1ee44eb

Please sign in to comment.