CodeQL #297
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: "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 |