55 branches : [ "main" ]
66 pull_request :
77 branches : [ "main" ]
8-
8+
99jobs :
1010 analyze :
1111 name : Analyze
12- runs-on : ${{ ( matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
13- timeout-minutes : 360
12+ runs-on : ${{ matrix.language == 'swift' && 'macos-latest' || 'ubuntu-latest' }}
13+ timeout-minutes : ${{ matrix.language == 'swift' && 120 || 360 }}
1414 permissions :
1515 actions : read
1616 contents : read
@@ -19,45 +19,41 @@ jobs:
1919 strategy :
2020 fail-fast : false
2121 matrix :
22- language : [ 'csharp', 'javascript-typescript' ]
22+ language : [ 'csharp', 'javascript-typescript', 'python' ]
2323 dot-version : ['3.1.x']
2424
2525 steps :
2626 - name : Checkout repository
2727 uses : actions/checkout@v3
2828
29- - name : Setup .NET for C#
29+ - name : Install dependencies
30+ run : |
31+ sudo apt-get update
32+ sudo apt-get install -y libicu-dev libssl-dev ca-certificates openssl
33+
34+ - name : Set System.Globalization.Invariant to true
35+ run : echo "DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1" >> $GITHUB_ENV
36+
37+ - name : Setup dotnet ${{ matrix.dot-version }}
3038 uses : actions/setup-dotnet@v3
3139 with :
3240 dotnet-version : ${{ matrix.dot-version }}
3341
34- - name : Display .NET version
42+ - name : Display dotnet version
3543 run : dotnet --version
3644
3745 - name : Initialize CodeQL
3846 uses : github/codeql-action/init@v2
3947 with :
4048 languages : ${{ matrix.language }}
4149
42- - name : Autobuild
43- uses : github/codeql-action/autobuild@v2
44-
45- - name : Install dependencies for JavaScript/TypeScript
46- if : matrix.language == 'javascript-typescript'
47- run : npm ci
48-
49- - name : Install dependencies for Python
50- if : matrix.language == 'python'
50+ - name : Build the C# project
51+ if : matrix.language == 'csharp'
5152 run : |
52- python -m pip install --upgrade pip
53- pip install -r requirements.txt
53+ dotnet restore
54+ dotnet build --configuration Release
5455
5556 - name : Perform CodeQL Analysis
5657 uses : github/codeql-action/analyze@v2
5758 with :
58- category : " /language:${{ matrix.language }}"
59-
60- - name : Upload SARIF results
61- uses : github/codeql-action/upload-sarif@v2
62- with :
63- sarif_file : results.sarif
59+ category : " /language:${{matrix.language}}"
0 commit comments