ltst1 #26
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: ${{ matrix.language == 'swift' && 120 || 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: Install libssl-dev | |
run: sudo apt-get install -y libssl-dev | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libicu-dev libssl-dev ca-certificates openssl | |
- name: Set System.Globalization.Invariant to true | |
run: echo "DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1" >> $GITHUB_ENV | |
- name: Setup dotnet ${{ matrix.dot-version }} | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ matrix.dot-version }} | |
- name: Display dotnet version | |
run: dotnet --version | |
- name: Initialize CodeQL | |
uses: github/codeql-action/init@v2 | |
with: | |
languages: ${{ matrix.language }} | |
- name: Build the C# project | |
if: matrix.language == 'csharp' | |
run: | | |
dotnet restore | |
dotnet build --configuration Release | |
- name: Perform CodeQL Analysis | |
uses: github/codeql-action/analyze@v2 | |
with: | |
category: "/language:${{matrix.language}}" |