Skip to content

[v2] Add movies module implementation (WIP) #1395

[v2] Add movies module implementation (WIP)

[v2] Add movies module implementation (WIP) #1395

Workflow file for this run

name: "Static Analysis"
on:
workflow_dispatch:
push:
paths:
- '.github/**'
- 'Source/**'
- 'src/**'
pull_request:
paths:
- '.github/**'
- 'Source/**'
- 'src/**'
jobs:
sonarcloud:
name: SonarCloud
if: ${{ github.actor == 'henrikfroehling' }}
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup environment variables
uses: cardinalby/export-env-action@v2
with:
envFile: './.github/constants.env'
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
${{ env.DOTNET_VERSION_STABLE }}
${{ env.DOTNET_VERSION_PREVIEW }}
- name: Install SonarCloud scanner
if: steps.cache-sonar-scanner.outputs.cache-hit != 'true'
shell: powershell
run: |
New-Item -Path .\.sonar\scanner -ItemType Directory
dotnet tool update dotnet-sonarscanner --tool-path .\.sonar\scanner
- name: Build and analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
shell: powershell
run: |
.\.sonar\scanner\dotnet-sonarscanner begin /k:"henrikfroehling_Trakt.NET" /o:"henrikfroehling-github" /n:"Trakt.NET" /d:sonar.exclusions="**/docs/**,**/Tests/**,**/tests/**," /d:sonar.sourceEncoding="UTF-8" /d:sonar.token="${{ secrets.SONAR_TOKEN }}" /d:sonar.host.url="https://sonarcloud.io"
dotnet build 'Source/Trakt.NET.sln' --configuration Release
dotnet build 'src/Trakt.NET.sln' --configuration Release
.\.sonar\scanner\dotnet-sonarscanner end /d:sonar.token="${{ secrets.SONAR_TOKEN }}"