29
29
qlupgrade :
30
30
runs-on : ubuntu-latest
31
31
steps :
32
- - uses : actions/checkout@v3
32
+ - uses : actions/checkout@v4
33
33
- uses : ./.github/actions/fetch-codeql
34
34
- name : Check DB upgrade scripts
35
35
run : |
52
52
matrix :
53
53
slice : ["1/2", "2/2"]
54
54
steps :
55
- - uses : actions/checkout@v3
56
- - uses : ./.github/actions/fetch-codeql
55
+ - uses : actions/checkout@v4
57
56
- uses : ./csharp/actions/create-extractor-pack
58
57
- name : Cache compilation cache
59
58
id : query-cache
@@ -62,25 +61,41 @@ jobs:
62
61
key : csharp-qltest-${{ matrix.slice }}
63
62
- name : Run QL tests
64
63
run : |
65
- CODEQL_PATH=$(gh codeql version --format=json | jq -r .unpackedLocation)
66
- # The legacy ASP extractor is not in this repo, so take the one from the nightly build
67
- mv "$CODEQL_PATH/csharp/tools/extractor-asp.jar" "${{ github.workspace }}/csharp/extractor-pack/tools"
68
- # Safe guard against using the bundled extractor
69
- rm -rf "$CODEQL_PATH/csharp"
70
- codeql test run --threads=0 --ram 50000 --slice ${{ matrix.slice }} --search-path "${{ github.workspace }}/csharp/extractor-pack" --check-databases --check-undefined-labels --check-repeated-labels --check-redefined-labels --consistency-queries ql/consistency-queries ql/test --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
64
+ codeql test run --threads=0 --ram 50000 --slice ${{ matrix.slice }} --search-path extractor-pack --check-databases --check-undefined-labels --check-repeated-labels --check-redefined-labels --consistency-queries ql/consistency-queries ql/test --compilation-cache "${{ steps.query-cache.outputs.cache-dir }}"
71
65
env :
72
66
GITHUB_TOKEN : ${{ github.token }}
73
67
unit-tests :
74
- runs-on : ubuntu-latest
68
+ strategy :
69
+ matrix :
70
+ os : [ubuntu-latest, windows-2019]
71
+ runs-on : ${{ matrix.os }}
75
72
steps :
76
- - uses : actions/checkout@v3
73
+ - uses : actions/checkout@v4
77
74
- name : Setup dotnet
78
75
uses : actions/setup-dotnet@v3
79
76
with :
80
77
dotnet-version : 7.0.102
81
78
- name : Extractor unit tests
82
79
run : |
83
- dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/csharp/ extractor/Semmle.Util.Tests"
84
- dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/csharp/ extractor/Semmle.Extraction.Tests"
85
- dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/csharp/ autobuilder/Semmle.Autobuild.CSharp.Tests"
80
+ dotnet test -p:RuntimeFrameworkVersion=7.0.2 extractor/Semmle.Util.Tests
81
+ dotnet test -p:RuntimeFrameworkVersion=7.0.2 extractor/Semmle.Extraction.Tests
82
+ dotnet test -p:RuntimeFrameworkVersion=7.0.2 autobuilder/Semmle.Autobuild.CSharp.Tests
86
83
dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests"
84
+ shell : bash
85
+ stubgentest :
86
+ runs-on : ubuntu-latest
87
+ steps :
88
+ - uses : actions/checkout@v4
89
+ - uses : ./csharp/actions/create-extractor-pack
90
+ - name : Run stub generator tests
91
+ run : |
92
+ # Generate (Asp)NetCore stubs
93
+ STUBS_PATH=stubs_output
94
+ python3 ql/src/Stubs/make_stubs_nuget.py webapp Swashbuckle.AspNetCore.Swagger 6.5.0 "$STUBS_PATH"
95
+ rm -rf ql/test/resources/stubs/_frameworks
96
+ # Update existing stubs in the repo with the freshly generated ones
97
+ mv "$STUBS_PATH/output/stubs/_frameworks" ql/test/resources/stubs/
98
+ git status
99
+ codeql test run --threads=0 --search-path extractor-pack --check-databases --check-undefined-labels --check-repeated-labels --check-redefined-labels --consistency-queries ql/consistency-queries -- ql/test/library-tests/dataflow/flowsources/aspremote
100
+ env :
101
+ GITHUB_TOKEN : ${{ github.token }}
0 commit comments