Skip to content

CodeQL

CodeQL #111

name: "CodeQL"
on:
push:
branches: [main]
workflow_dispatch:
schedule:
- cron: "29 3 * * 0"
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
language: ["csharp", "python"]
permissions:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
# Compiling is required for csharp
- name: Setup .NET Core SDK
if: ${{ matrix.language == 'csharp' }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: "7.0.x"
dotnet-quality: "ga"
- name: Install dependencies
if: ${{ matrix.language == 'csharp' }}
run: |
cd src/ApiService/
dotnet restore --locked-mode
- name: Build Service
if: ${{ matrix.language == 'csharp' }}
run: |
cd src/ApiService/
dotnet build -warnaserror --configuration Release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2