Bump System.Text.Json from 9.0.1 to 9.0.2 #97
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: sonarcloud | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'src/**' | |
- 'tests/**' | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths: | |
- 'src/**' | |
- 'test/**' | |
pull_request_target: | |
types: [opened, synchronize, reopened] | |
paths: | |
- 'src/**' | |
- 'test/**' | |
permissions: | |
contents: read | |
checks: write | |
env: | |
JAVA_VERSION: '21' | |
DOTNET_VERSION: '9.*' | |
jobs: | |
build: | |
if: | | |
(github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]') || | |
(github.event_name != 'pull_request_target' && github.actor != 'dependabot[bot]') | |
strategy: | |
matrix: | |
os: [ ubuntu-latest ] | |
name: build-and-test | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
if: ${{ github.event_name != 'pull_request_target' }} | |
with: | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- name: Checkout PR | |
if: ${{ github.event_name == 'pull_request_target' }} | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'microsoft' | |
java-version: ${{ env.JAVA_VERSION }} | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: ${{ env.DOTNET_VERSION }} | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v3 | |
with: | |
path: ~/sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache SonarCloud scanner | |
id: cache-sonar-scanner | |
uses: actions/cache@v3 | |
with: | |
path: ./.sonar/scanner | |
key: ${{ runner.os }}-sonar-scanner | |
restore-keys: ${{ runner.os }}-sonar-scanner | |
- name: Install SonarCloud scanner | |
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' | |
shell: pwsh | |
run: | | |
New-Item -Path ./.sonar/scanner -ItemType Directory | |
dotnet tool update dotnet-sonarscanner --tool-path ./.sonar/scanner | |
- name: Sops Binary Installer | |
uses: mdgreenwald/mozilla-sops-action@v1.2.0 | |
- uses: actions/cache@v3 | |
with: | |
path: ~/.nuget/packages | |
# Look to see if there is a cache hit for the corresponding requirements file | |
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-nuget | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Start scanner | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: ./.sonar/scanner/dotnet-sonarscanner begin /k:"mmalyska_argocd-secret-replacer" /o:"mmalyska" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" /s:$GITHUB_WORKSPACE/SonarQube.Analysis.xml | |
- name: Build | |
run: dotnet build --configuration Release --no-restore | |
- name: Test | |
run: dotnet test --no-restore --verbosity normal --logger trx --settings coverlet.runsettings --results-directory "TestResults" | |
- name: Stop scanner | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
run: ./.sonar/scanner/dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" |