nw1 #20
This file contains hidden or 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" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
analyze: | |
name: Analyze | |
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} | |
timeout-minutes: 360 | |
permissions: | |
actions: read | |
contents: read | |
security-events: write | |
strategy: | |
fail-fast: false | |
matrix: | |
language: [ 'csharp', 'javascript-typescript' ] | |
dot-version: ['3.1.x'] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Setup .NET for C# | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ matrix.dot-version }} | |
- name: Display .NET version | |
run: dotnet --version | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Autobuild | |
uses: github/codeql-action/autobuild@v2 | |
- name: Install dependencies for JavaScript/TypeScript | |
if: matrix.language == 'javascript-typescript' | |
run: npm ci | |
- name: Install dependencies for Python | |
if: matrix.language == 'python' | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
with: | |
category: "/language:${{ matrix.language }}" | |
- name: Upload SARIF results | |
uses: github/codeql-action/upload-sarif@v2 | |
with: | |
sarif_file: results.sarif |