mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
C#: Add stub generator integration test
This commit is contained in:
@@ -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 }}
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user