C#: Add stub generator integration test

This commit is contained in:
Tom Hvitved
2023-09-25 13:39:21 +02:00
parent 06cb277eb0
commit 4262fd5a48
3 changed files with 33 additions and 13 deletions

View File

@@ -3,6 +3,7 @@ description: Builds the C# CodeQL pack
runs:
using: composite
steps:
- uses: ./.github/actions/fetch-codeql
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
@@ -11,3 +12,13 @@ runs:
shell: bash
run: scripts/create-extractor-pack.sh
working-directory: csharp
- name: Patch bundle to include ASP extractor
shell: bash
run: |
CODEQL_PATH=$(gh codeql version --format=json | jq -r .unpackedLocation)
# The legacy ASP extractor is not in this repo, so take the one from the nightly build
mv "$CODEQL_PATH/csharp/tools/extractor-asp.jar" "${{ github.workspace }}/csharp/extractor-pack/tools"
# Safe guard against using the bundled extractor
rm -rf "$CODEQL_PATH/csharp"
env:
GITHUB_TOKEN: ${{ github.token }}

View File

@@ -211,7 +211,6 @@ with open(os.path.join(frameworksDir, 'Microsoft.NETCore.App', 'Microsoft.NETCor
copiedFiles.add(pathInfo)
shutil.copy2(pathInfos[pathInfo], frameworkDir)
exitCode = 0
for pathInfo in pathInfos:
if pathInfo not in copiedFiles:
print('Not copied to nuget or framework folder: ' + pathInfo)
@@ -219,8 +218,7 @@ for pathInfo in pathInfos:
if not os.path.exists(othersDir):
os.makedirs(othersDir)
shutil.copy2(pathInfos[pathInfo], othersDir)
exitCode = 1
print("\n --> Generated structured stub files: " + stubsDir)
exit(exitCode)
exit(0)