From 2ff8c4235d05cbe2e6346de4ffb67181842d6cc2 Mon Sep 17 00:00:00 2001 From: jennyf19 Date: Sat, 4 Jan 2025 14:13:45 -0800 Subject: [PATCH 1/4] use only src files and re-add comments --- .github/workflows/dotnetcore.yml | 33 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/.github/workflows/dotnetcore.yml b/.github/workflows/dotnetcore.yml index 5215db9db..c7f4c0199 100644 --- a/.github/workflows/dotnetcore.yml +++ b/.github/workflows/dotnetcore.yml @@ -54,28 +54,27 @@ jobs: - name: Create code coverage report run: | dotnet tool install -g dotnet-reportgenerator-globaltool --version 5.4.1 - reportgenerator -reports:./**/coverage.cobertura.xml -targetdir:CodeCoverage -reporttypes:'MarkdownSummaryGithub;Cobertura' + reportgenerator -reports:./**/coverage.cobertura.xml -targetdir:CodeCoverage -reporttypes:'MarkdownSummaryGithub;Cobertura' -filefilters:'+src/**/*.cs' - name: Write coverage to job summary shell: bash run: | cat CodeCoverage/SummaryGithub.md >> $GITHUB_STEP_SUMMARY - # Temporarily disable commenting the coverage report - # echo "COMMENT_CONTENT_ENV_VAR<> $GITHUB_ENV - # echo $(cat CodeCoverage/SummaryGithub.md) >> $GITHUB_ENV - # echo "EOF" >> $GITHUB_ENV - - # - name: Comment coverage in PR - # uses: actions/github-script@v7 - # id: comment - # with: - # script: | - # github.rest.issues.createComment({ - # issue_number: context.issue.number, - # owner: context.repo.owner, - # repo: context.repo.repo, - # body: process.env.COMMENT_CONTENT_ENV_VAR - # }) + echo "COMMENT_CONTENT_ENV_VAR<> $GITHUB_ENV + echo $(cat CodeCoverage/SummaryGithub.md) >> $GITHUB_ENV + echo "EOF" >> $GITHUB_ENV + + - name: Comment coverage in PR + uses: actions/github-script@v7 + id: comment + with: + script: | + github.rest.issues.createComment({ + issue_number: context.issue.number, + owner: context.repo.owner, + repo: context.repo.repo, + body: process.env.COMMENT_CONTENT_ENV_VAR + }) - name: Test with .NET 462 run: dotnet test --no-restore --no-build Microsoft.Identity.Web.sln -f net462 -v normal -p:FROM_GITHUB_ACTION=true --configuration Release --filter "(FullyQualifiedName!~Microsoft.Identity.Web.Test.Integration)&(FullyQualifiedName!~WebAppUiTests)&(FullyQualifiedName!~IntegrationTests)" From ce13ffaf89975baaed0c00da1980d8ee03b7ca05 Mon Sep 17 00:00:00 2001 From: jennyf19 Date: Sat, 4 Jan 2025 14:25:11 -0800 Subject: [PATCH 2/4] update codeql --- .github/workflows/codeql-analysis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2f500af98..66d5902db 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -26,6 +26,11 @@ jobs: # a pull request then we can checkout the head. fetch-depth: 2 + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 9.0.x + # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 From b705e4ee3fd7daf5f9e747db112686b4f7f42f2e Mon Sep 17 00:00:00 2001 From: jennyf19 Date: Sat, 4 Jan 2025 14:32:37 -0800 Subject: [PATCH 3/4] remove what I added --- .github/workflows/codeql-analysis.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 66d5902db..2f500af98 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -26,11 +26,6 @@ jobs: # a pull request then we can checkout the head. fetch-depth: 2 - - name: Setup .NET - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 9.0.x - # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL uses: github/codeql-action/init@v3 From 346754f0410b51e18358567195264d815c9ea837 Mon Sep 17 00:00:00 2001 From: jennyf19 Date: Sat, 4 Jan 2025 14:35:02 -0800 Subject: [PATCH 4/4] add net 8 for codeql workflow --- .github/workflows/codeql-analysis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 2f500af98..a1a7d6e15 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -44,6 +44,11 @@ jobs: # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines # and modify them (or add more) to build your code if your project # uses a compiled language + - name: Setup .NET 8.0.x + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.x + - name: Setup .NET 9.0.x uses: actions/setup-dotnet@v4 with: