|
53 | 53 | slice: ["1/2", "2/2"] |
54 | 54 | steps: |
55 | 55 | - uses: actions/checkout@v4 |
56 | | - - uses: ./.github/actions/fetch-codeql |
57 | 56 | - uses: ./csharp/actions/create-extractor-pack |
58 | 57 | - name: Cache compilation cache |
59 | 58 | id: query-cache |
|
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: |
|
80 | 74 | dotnet-version: 7.0.102 |
81 | 75 | - name: Extractor unit tests |
82 | 76 | 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" |
| 77 | + dotnet test -p:RuntimeFrameworkVersion=7.0.2 extractor/Semmle.Util.Tests |
| 78 | + dotnet test -p:RuntimeFrameworkVersion=7.0.2 extractor/Semmle.Extraction.Tests |
| 79 | + dotnet test -p:RuntimeFrameworkVersion=7.0.2 autobuilder/Semmle.Autobuild.CSharp.Tests |
86 | 80 | dotnet test -p:RuntimeFrameworkVersion=7.0.2 "${{ github.workspace }}/cpp/autobuilder/Semmle.Autobuild.Cpp.Tests" |
| 81 | + stubgentest: |
| 82 | + runs-on: ubuntu-latest |
| 83 | + steps: |
| 84 | + - uses: actions/checkout@v4 |
| 85 | + - uses: ./csharp/actions/create-extractor-pack |
| 86 | + - name: Run stub generator tests |
| 87 | + run: | |
| 88 | + # Generate (Asp)NetCore stubs |
| 89 | + STUBS_PATH=stubs_output |
| 90 | + python3 ql/src/Stubs/make_stubs_nuget.py webapp Swashbuckle.AspNetCore.Swagger latest "$STUBS_PATH" |
| 91 | + rm -rf ql/test/resources/stubs/_frameworks |
| 92 | + # Update existing stubs in the repo with the freshly generated ones |
| 93 | + mv "$STUBS_PATH/output/stubs/_frameworks" ql/test/resources/stubs/ |
| 94 | + git status |
| 95 | + 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 |
| 96 | + env: |
| 97 | + GITHUB_TOKEN: ${{ github.token }} |
0 commit comments