Re-enabled GA code analysis (#883)

This commit is contained in:
Joseph Milazzo 2022-01-30 08:19:54 -08:00 committed by GitHub
parent d3fb612226
commit 1b6a00df3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -36,68 +36,68 @@ jobs:
name: csproj name: csproj
path: Kavita.Common/Kavita.Common.csproj path: Kavita.Common/Kavita.Common.csproj
# test: test:
# name: Install Sonar & Test name: Install Sonar & Test
# needs: build needs: build
# runs-on: windows-latest runs-on: windows-latest
# steps: steps:
# - name: Checkout Repo - name: Checkout Repo
# uses: actions/checkout@v2 uses: actions/checkout@v2
# with: with:
# fetch-depth: 0 fetch-depth: 0
#
# - name: Setup .NET Core - name: Setup .NET Core
# uses: actions/setup-dotnet@v1 uses: actions/setup-dotnet@v1
# with: with:
# include-prerelease: True include-prerelease: True
# dotnet-version: '6.0' dotnet-version: '6.0'
#
# - name: Install dependencies - name: Install dependencies
# run: dotnet restore run: dotnet restore
#
# - name: Set up JDK 11 - name: Set up JDK 11
# uses: actions/setup-java@v1 uses: actions/setup-java@v1
# with: with:
# java-version: 1.11 java-version: 1.11
#
# - name: Cache SonarCloud packages - name: Cache SonarCloud packages
# uses: actions/cache@v1 uses: actions/cache@v1
# with: with:
# path: ~\sonar\cache path: ~\sonar\cache
# key: ${{ runner.os }}-sonar key: ${{ runner.os }}-sonar
# restore-keys: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar
#
# - name: Cache SonarCloud scanner - name: Cache SonarCloud scanner
# id: cache-sonar-scanner id: cache-sonar-scanner
# uses: actions/cache@v1 uses: actions/cache@v1
# with: with:
# path: .\.sonar\scanner path: .\.sonar\scanner
# key: ${{ runner.os }}-sonar-scanner key: ${{ runner.os }}-sonar-scanner
# restore-keys: ${{ runner.os }}-sonar-scanner restore-keys: ${{ runner.os }}-sonar-scanner
#
# - name: Install SonarCloud scanner - name: Install SonarCloud scanner
# if: steps.cache-sonar-scanner.outputs.cache-hit != 'true' if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
# shell: powershell shell: powershell
# run: | run: |
# New-Item -Path .\.sonar\scanner -ItemType Directory New-Item -Path .\.sonar\scanner -ItemType Directory
# dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
#
# - name: Sonar Scan - name: Sonar Scan
# env: env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
# SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
# shell: powershell shell: powershell
# run: | run: |
# .\.sonar\scanner\dotnet-sonarscanner begin /k:"Kareadita_Kavita" /o:"kareadita" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io" .\.sonar\scanner\dotnet-sonarscanner begin /k:"Kareadita_Kavita" /o:"kareadita" /d:sonar.login="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
# dotnet build --configuration Release dotnet build --configuration Release
# .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}" .\.sonar\scanner\dotnet-sonarscanner end /d:sonar.login="${{ secrets.SONAR_TOKEN }}"
#
# - name: Test - name: Test
# run: dotnet test --no-restore --verbosity normal run: dotnet test --no-restore --verbosity normal
version: version:
name: Bump version on Develop push name: Bump version on Develop push
needs: [ build ] needs: [ build, test ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }} if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
steps: steps:
@ -125,7 +125,7 @@ jobs:
develop: develop:
name: Build Nightly Docker if Develop push name: Build Nightly Docker if Develop push
needs: [ build, version ] needs: [ build, test, version ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }} if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/develop' }}
steps: steps:
@ -229,7 +229,7 @@ jobs:
stable: stable:
name: Build Stable Docker if Main push name: Build Stable Docker if Main push
needs: [ build ] needs: [ build, test ]
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps: steps: