From 2eefe9553358abb5e94e09a4dc22ec39e19498fa Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 14:59:57 +1100 Subject: [PATCH 01/20] Add GitHub Actions workflow for PR tests Introduces a workflow to run tests and code quality checks on pull requests targeting the main and dev branches. The workflow builds and tests the extension and its tests, publishes results, and enforces build warnings as errors to maintain code quality. --- .github/workflows/pr-tests.yml | 147 +++++++++++++++++++++++++++++++++ 1 file changed, 147 insertions(+) create mode 100644 .github/workflows/pr-tests.yml diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml new file mode 100644 index 0000000..ebcc4f1 --- /dev/null +++ b/.github/workflows/pr-tests.yml @@ -0,0 +1,147 @@ +name: Pull Request Tests + +on: + pull_request: + branches: + - main + - dev + types: [opened, synchronize, reopened] + +jobs: + test: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v2 + + - name: Restore NuGet packages for Extension + run: nuget restore InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj + + - name: Restore NuGet packages for Tests + run: nuget restore InterfaceExtractor.Tests/InterfaceExtractor.Tests.csproj + + - name: Build Extension + run: msbuild InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj /p:Configuration=Debug /v:m + + - name: Build Tests + run: msbuild InterfaceExtractor.Tests/InterfaceExtractor.Tests.csproj /p:Configuration=Debug /v:m + + - name: Setup VSTest + uses: darenm/Setup-VSTest@v1.2 + + - name: Run Tests + run: vstest.console.exe InterfaceExtractor.Tests/bin/Debug/InterfaceExtractor.Tests.dll /logger:trx /ResultsDirectory:TestResults + + - name: Publish Test Results + uses: EnricoMi/publish-unit-test-result-action/windows@v2 + if: always() + with: + files: | + TestResults/**/*.trx + check_name: Test Results + comment_title: Test Results + compare_to_earlier_commit: false + + - name: Upload Test Results as Artifact + uses: actions/upload-artifact@v4 + if: always() + with: + name: test-results + path: TestResults/ + retention-days: 30 + + - name: Test Summary + if: always() + shell: pwsh + run: | + $trxFiles = Get-ChildItem -Path TestResults -Filter *.trx -Recurse + + if ($trxFiles.Count -eq 0) { + Write-Host "โŒ No test results found!" + exit 1 + } + + foreach ($trxFile in $trxFiles) { + [xml]$trx = Get-Content $trxFile.FullName + $summary = $trx.TestRun.ResultSummary + $counters = $summary.Counters + + $total = [int]$counters.total + $passed = [int]$counters.passed + $failed = [int]$counters.failed + $skipped = [int]$counters.total - [int]$counters.executed + + Write-Host "" + Write-Host "๐Ÿ“Š Test Summary" + Write-Host "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" + Write-Host "โœ… Passed: $passed" + Write-Host "โŒ Failed: $failed" + Write-Host "โญ๏ธ Skipped: $skipped" + Write-Host "๐Ÿ“ Total: $total" + Write-Host "โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”" + + if ($failed -gt 0) { + Write-Host "" + Write-Host "โŒ Tests Failed!" + exit 1 + } else { + Write-Host "" + Write-Host "โœ… All Tests Passed!" + } + } + + code-quality: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Setup NuGet + uses: NuGet/setup-nuget@v2 + + - name: Restore NuGet packages + run: | + nuget restore InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj + nuget restore InterfaceExtractor.Tests/InterfaceExtractor.Tests.csproj + + - name: Build Solution (Release) + run: msbuild InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj /p:Configuration=Release /v:m /warnaserror + + - name: Check for Build Warnings + if: success() + shell: pwsh + run: | + Write-Host "โœ… Build completed successfully with no warnings!" + + status-check: + runs-on: ubuntu-latest + needs: [test, code-quality] + if: always() + + steps: + - name: Check Test Status + if: needs.test.result != 'success' + run: | + echo "โŒ Tests failed or were cancelled" + exit 1 + + - name: Check Code Quality Status + if: needs.code-quality.result != 'success' + run: | + echo "โŒ Code quality checks failed or were cancelled" + exit 1 + + - name: All Checks Passed + run: | + echo "โœ… All checks passed successfully!" \ No newline at end of file From 84bea95493facbccb58a22af6c57a346dbd0bcb2 Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 15:01:38 +1100 Subject: [PATCH 02/20] Update pr-tests.yml --- .github/workflows/pr-tests.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index ebcc4f1..b1cae2a 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -119,7 +119,6 @@ jobs: run: msbuild InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj /p:Configuration=Release /v:m /warnaserror - name: Check for Build Warnings - if: success() shell: pwsh run: | Write-Host "โœ… Build completed successfully with no warnings!" From f515c6a409262651097eb6dc2c662f107c10d856 Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 15:17:13 +1100 Subject: [PATCH 03/20] Optimize CI workflows and improve version handling Adds path filters and concurrency controls to PR and release workflows to reduce unnecessary runs. Implements NuGet package caching for faster builds, refactors build commands for minimal verbosity, and improves version extraction and update logic in the release workflow for better reliability and Windows compatibility. --- .github/workflows/pr-tests.yml | 51 ++++++++++++++++++++++++++----- .github/workflows/release.yml | 55 ++++++++++++++++++++++++++++++---- 2 files changed, 93 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index b1cae2a..23f3f06 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -6,6 +6,18 @@ on: - main - dev types: [opened, synchronize, reopened] + paths: + - '**.cs' + - '**.csproj' + - '**.xaml' + - '**.vsct' + - '**.vsixmanifest' + - '.github/workflows/pr-tests.yml' + +# Cancel in-progress runs when new commits are pushed +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: test: @@ -21,17 +33,28 @@ jobs: - name: Setup NuGet uses: NuGet/setup-nuget@v2 - - name: Restore NuGet packages for Extension - run: nuget restore InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj + # Cache NuGet packages to speed up builds + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: | + ~/.nuget/packages + ${{ github.workspace }}/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json', '**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-nuget- - - name: Restore NuGet packages for Tests - run: nuget restore InterfaceExtractor.Tests/InterfaceExtractor.Tests.csproj + - name: Restore NuGet packages + run: | + nuget restore InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj + nuget restore InterfaceExtractor.Tests/InterfaceExtractor.Tests.csproj + shell: pwsh - name: Build Extension - run: msbuild InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj /p:Configuration=Debug /v:m + run: msbuild InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj /p:Configuration=Debug /v:minimal /m - name: Build Tests - run: msbuild InterfaceExtractor.Tests/InterfaceExtractor.Tests.csproj /p:Configuration=Debug /v:m + run: msbuild InterfaceExtractor.Tests/InterfaceExtractor.Tests.csproj /p:Configuration=Debug /v:minimal /m - name: Setup VSTest uses: darenm/Setup-VSTest@v1.2 @@ -55,7 +78,7 @@ jobs: with: name: test-results path: TestResults/ - retention-days: 30 + retention-days: 7 - name: Test Summary if: always() @@ -110,13 +133,25 @@ jobs: - name: Setup NuGet uses: NuGet/setup-nuget@v2 + # Cache NuGet packages + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: | + ~/.nuget/packages + ${{ github.workspace }}/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json', '**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-nuget- + - name: Restore NuGet packages run: | nuget restore InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj nuget restore InterfaceExtractor.Tests/InterfaceExtractor.Tests.csproj + shell: pwsh - name: Build Solution (Release) - run: msbuild InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj /p:Configuration=Release /v:m /warnaserror + run: msbuild InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj /p:Configuration=Release /v:minimal /m /warnaserror - name: Check for Build Warnings shell: pwsh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f45e4eb..2081624 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,9 +1,22 @@ name: Visual Studio Extension Release + on: push: branches: - main - dev + paths: + - '**.cs' + - '**.csproj' + - '**.xaml' + - '**.vsct' + - '**.vsixmanifest' + - '.github/workflows/release.yml' + +# Prevent multiple releases from running simultaneously +concurrency: + group: release-${{ github.ref }} + cancel-in-progress: false # Don't cancel releases, queue them jobs: build-and-publish: @@ -22,6 +35,17 @@ jobs: - name: Setup NuGet uses: NuGet/setup-nuget@v2 + # Cache NuGet packages + - name: Cache NuGet packages + uses: actions/cache@v4 + with: + path: | + ~/.nuget/packages + ${{ github.workspace }}/.nuget/packages + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json', '**/*.csproj') }} + restore-keys: | + ${{ runner.os }}-nuget- + - name: Restore NuGet packages run: nuget restore InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj @@ -68,9 +92,19 @@ jobs: id: version shell: bash run: | - # Read current version from vsixmanifest + # Read current version from vsixmanifest using sed (Windows compatible) MANIFEST_FILE="InterfaceExtractor.Extension/source.extension.vsixmanifest" - CURRENT_VERSION=$(grep -oP 'Version="\K[^"]+' "$MANIFEST_FILE" | head -1) + + # Extract version using sed instead of grep -P + CURRENT_VERSION=$(sed -n 's/.*Version="\([^"]*\)".*/\1/p' "$MANIFEST_FILE" | head -1) + + if [ -z "$CURRENT_VERSION" ]; then + echo "โŒ Could not read version from manifest" + exit 1 + fi + + echo "Current version: $CURRENT_VERSION" + BUMP_TYPE="${{ steps.version-bump.outputs.BUMP_TYPE }}" BRANCH_NAME="${{ github.ref_name }}" @@ -139,8 +173,19 @@ jobs: echo "๐Ÿ“ฆ Production version: $DISPLAY_VERSION (${BUMP_TYPE} bump)" fi - # Update version in vsixmanifest - sed -i "s/Version=\"[^\"]*\"/Version=\"${NEW_VERSION}\"/" "$MANIFEST_FILE" + echo "New version will be: $NEW_VERSION (display: $DISPLAY_VERSION)" + + # Update version in vsixmanifest - use a more robust sed command + sed -i.bak "s/Version=\"[^\"]*\"/Version=\"${NEW_VERSION}\"/" "$MANIFEST_FILE" + + # Verify the change + NEW_VERSION_CHECK=$(sed -n 's/.*Version="\([^"]*\)".*/\1/p' "$MANIFEST_FILE" | head -1) + echo "Verified new version in manifest: $NEW_VERSION_CHECK" + + if [ "$NEW_VERSION_CHECK" != "$NEW_VERSION" ]; then + echo "โŒ Version update failed!" + exit 1 + fi echo "VERSION=$NEW_VERSION" >> $GITHUB_OUTPUT echo "DISPLAY_VERSION=$DISPLAY_VERSION" >> $GITHUB_OUTPUT @@ -151,7 +196,7 @@ jobs: echo "RELEASE_TYPE=$RELEASE_TYPE" >> $GITHUB_OUTPUT - name: Build Extension - run: msbuild InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj /p:Configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m + run: msbuild InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj /p:Configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:minimal /m - name: Locate VSIX file id: locate-vsix From 100bddc84c0f7d214ecab6f5431b23c92b333531 Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 15:22:00 +1100 Subject: [PATCH 04/20] Fix async context usage and test method signature Updated ExtractInterfaceCommand to use the package's JoinableTaskFactory for async execution and main thread switching. Changed the test CompleteFlow_AppendInterface_UpdatesClassAsync from async Task to void and removed unnecessary async/await code. --- .../Commands/ExtractInterfaceCommand.cs | 6 +++--- .../Integration/IntegrationTests.cs | 10 +--------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/InterfaceExtractor.Extension/Commands/ExtractInterfaceCommand.cs b/InterfaceExtractor.Extension/Commands/ExtractInterfaceCommand.cs index 2067a99..2c208b5 100644 --- a/InterfaceExtractor.Extension/Commands/ExtractInterfaceCommand.cs +++ b/InterfaceExtractor.Extension/Commands/ExtractInterfaceCommand.cs @@ -98,8 +98,8 @@ private void OnBeforeQueryStatus(object sender, EventArgs e) private void Execute(object sender, EventArgs e) { - // Use JoinableTaskFactory.RunAsync for proper async execution from sync context - ThreadHelper.JoinableTaskFactory.RunAsync(async () => + // Use the package's JoinableTaskFactory for proper async execution + this.package.JoinableTaskFactory.RunAsync(async () => { try { @@ -107,7 +107,7 @@ private void Execute(object sender, EventArgs e) } catch (Exception ex) { - await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); + await this.package.JoinableTaskFactory.SwitchToMainThreadAsync(); LogMessage($"Critical error: {ex.Message}"); LogMessage($"Stack trace: {ex.StackTrace}"); ShowMessage($"Error: {ex.Message}\n\nCheck the Output Window for details."); diff --git a/InterfaceExtractor.Tests/Integration/IntegrationTests.cs b/InterfaceExtractor.Tests/Integration/IntegrationTests.cs index 541e3df..d0b8f0d 100644 --- a/InterfaceExtractor.Tests/Integration/IntegrationTests.cs +++ b/InterfaceExtractor.Tests/Integration/IntegrationTests.cs @@ -204,18 +204,10 @@ public async Task CompleteFlow_ReadOnlyProperties_DetectsCorrectlyAsync() } [Fact] - public async Task CompleteFlow_AppendInterface_UpdatesClassAsync() + public void CompleteFlow_AppendInterface_UpdatesClassAsync() { // Arrange var sourceCode = TestHelpers.SampleCode.SimpleClass; - var filePath = TestHelpers.CreateTempCSharpFile(sourceCode, _tempDirectory); - - // Act - Analyze and generate - var classInfos = await _service.AnalyzeClassesAsync(filePath); - var interfaceCode = InterfaceExtractorService.GenerateInterface( - "ISimpleClass", - classInfos[0], - classInfos[0].Members); // Act - Append interface to class var updatedCode = InterfaceExtractorService.AppendInterfaceToClass( From 04f7c0cb46d1ef8a91ec8c87bf2c35797f8885aa Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 15:31:23 +1100 Subject: [PATCH 05/20] Improve test DLL discovery in PR test workflow Added PowerShell steps to list build output and dynamically locate the test DLL before running tests. This makes the workflow more robust to changes in build output paths and improves debugging when the test DLL is missing. --- .github/workflows/pr-tests.yml | 34 ++++++++++++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index 23f3f06..c9e1a5f 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -56,11 +56,41 @@ jobs: - name: Build Tests run: msbuild InterfaceExtractor.Tests/InterfaceExtractor.Tests.csproj /p:Configuration=Debug /v:minimal /m + # Debug: Show what was built + - name: List build output + shell: pwsh + run: | + Write-Host "Looking for test DLL..." + if (Test-Path "InterfaceExtractor.Tests\bin\Debug") { + Get-ChildItem -Path "InterfaceExtractor.Tests\bin\Debug" -Recurse | Where-Object { $_.Extension -eq ".dll" } | ForEach-Object { + Write-Host "Found: $($_.FullName)" + } + } else { + Write-Host "Debug directory not found!" + Write-Host "Listing InterfaceExtractor.Tests\bin contents:" + if (Test-Path "InterfaceExtractor.Tests\bin") { + Get-ChildItem -Path "InterfaceExtractor.Tests\bin" -Recurse + } + } + - name: Setup VSTest uses: darenm/Setup-VSTest@v1.2 - name: Run Tests - run: vstest.console.exe InterfaceExtractor.Tests/bin/Debug/InterfaceExtractor.Tests.dll /logger:trx /ResultsDirectory:TestResults + shell: pwsh + run: | + # Find the test DLL (might be in net48 subdirectory) + $testDll = Get-ChildItem -Path "InterfaceExtractor.Tests\bin\Debug" -Filter "InterfaceExtractor.Tests.dll" -Recurse | Select-Object -First 1 + + if ($null -eq $testDll) { + Write-Host "โŒ Test DLL not found!" + exit 1 + } + + Write-Host "โœ… Found test DLL at: $($testDll.FullName)" + + # Run tests + vstest.console.exe $testDll.FullName /logger:trx /ResultsDirectory:TestResults - name: Publish Test Results uses: EnricoMi/publish-unit-test-result-action/windows@v2 @@ -78,7 +108,7 @@ jobs: with: name: test-results path: TestResults/ - retention-days: 7 + retention-days: 7 - name: Test Summary if: always() From 865f06a323ee5a2caa6d3a9ad8041b2b35f7ac9b Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 15:34:59 +1100 Subject: [PATCH 06/20] Add explicit permissions to GitHub workflows Specified required permissions in pr-tests.yml and release.yml to improve security and clarify access needs for workflow actions. --- .github/workflows/pr-tests.yml | 4 ++++ .github/workflows/release.yml | 3 +++ 2 files changed, 7 insertions(+) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index c9e1a5f..7efb616 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -1,5 +1,9 @@ name: Pull Request Tests +permissions: + contents: read # Needed for checkout and caching + pull-requests: write # Needed for publishing test results to PR + on: pull_request: branches: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2081624..e3a3e57 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,8 @@ name: Visual Studio Extension Release +permissions: + contents: write # Needed for creating releases and pushing tags + on: push: branches: From 54d87069bb442c415a8d13b15d22be3f8c70d157 Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 15:40:08 +1100 Subject: [PATCH 07/20] Add checks: write permission to workflow Grants 'checks: write' permission in the PR tests workflow to enable publishing test results as check runs. --- .github/workflows/pr-tests.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index 7efb616..c5a3970 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -2,6 +2,7 @@ name: Pull Request Tests permissions: contents: read # Needed for checkout and caching + checks: write # Needed for publishing test results as check runs pull-requests: write # Needed for publishing test results to PR on: From 4f9c7f8bf75c223db616c94ca9abb6084f167151 Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 15:49:48 +1100 Subject: [PATCH 08/20] Refine CI scripts for test and release workflows Removes debug output listing from PR test workflow and improves version extraction and update logic in the release workflow to target only the Identity element in the vsixmanifest. These changes streamline CI output and make version handling more robust. --- .github/workflows/pr-tests.yml | 17 ----------------- .github/workflows/release.yml | 11 +++++------ 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index c5a3970..6cd91f9 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -61,23 +61,6 @@ jobs: - name: Build Tests run: msbuild InterfaceExtractor.Tests/InterfaceExtractor.Tests.csproj /p:Configuration=Debug /v:minimal /m - # Debug: Show what was built - - name: List build output - shell: pwsh - run: | - Write-Host "Looking for test DLL..." - if (Test-Path "InterfaceExtractor.Tests\bin\Debug") { - Get-ChildItem -Path "InterfaceExtractor.Tests\bin\Debug" -Recurse | Where-Object { $_.Extension -eq ".dll" } | ForEach-Object { - Write-Host "Found: $($_.FullName)" - } - } else { - Write-Host "Debug directory not found!" - Write-Host "Listing InterfaceExtractor.Tests\bin contents:" - if (Test-Path "InterfaceExtractor.Tests\bin") { - Get-ChildItem -Path "InterfaceExtractor.Tests\bin" -Recurse - } - } - - name: Setup VSTest uses: darenm/Setup-VSTest@v1.2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e3a3e57..74c38f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -98,8 +98,8 @@ jobs: # Read current version from vsixmanifest using sed (Windows compatible) MANIFEST_FILE="InterfaceExtractor.Extension/source.extension.vsixmanifest" - # Extract version using sed instead of grep -P - CURRENT_VERSION=$(sed -n 's/.*Version="\([^"]*\)".*/\1/p' "$MANIFEST_FILE" | head -1) + # Extract version from Identity element specifically + CURRENT_VERSION=$(sed -n 's/.*> $GITHUB_OUTPUT echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_OUTPUT echo "RELEASE_TYPE=$RELEASE_TYPE" >> $GITHUB_OUTPUT - - name: Build Extension run: msbuild InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj /p:Configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:minimal /m From 47ba98c689e32ab38095b8d01b9c7b6b4f6a720d Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 15:50:50 +1100 Subject: [PATCH 09/20] Trigger release workflow on testing branches Added pattern to match branches containing 'testing' in their name, enabling the release workflow to run on those branches as well as main and dev. --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 74c38f5..f561b4a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,7 @@ on: branches: - main - dev + - '*testing*' # Matches any branch with "testing" in the name paths: - '**.cs' - '**.csproj' From 993e441cf91d58d5fd51b907ea0bd6754c711c3e Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 15:55:43 +1100 Subject: [PATCH 10/20] Remove testing branch trigger from release workflow The release workflow will no longer run on branches containing 'testing' in their name. This change restricts workflow execution to only 'main' and 'dev' branches. --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f561b4a..74c38f5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,6 @@ on: branches: - main - dev - - '*testing*' # Matches any branch with "testing" in the name paths: - '**.cs' - '**.csproj' From f39ca0aae97df0c88d99067b0efbffec1026c524 Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 16:04:37 +1100 Subject: [PATCH 11/20] Enforce warnings as errors in CI and add environment approval CI builds now treat warnings as errors for both extension and test projects to improve code quality. The release workflow now requires environment approval based on branch, distinguishing between production and development deployments. --- .github/workflows/pr-tests.yml | 5 +++-- .github/workflows/release.yml | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index 6cd91f9..6fa06bf 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -55,11 +55,12 @@ jobs: nuget restore InterfaceExtractor.Tests/InterfaceExtractor.Tests.csproj shell: pwsh + # Build with warnings as errors for quality - name: Build Extension - run: msbuild InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj /p:Configuration=Debug /v:minimal /m + run: msbuild InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj /p:Configuration=Debug /v:minimal /m /warnaserror - name: Build Tests - run: msbuild InterfaceExtractor.Tests/InterfaceExtractor.Tests.csproj /p:Configuration=Debug /v:minimal /m + run: msbuild InterfaceExtractor.Tests/InterfaceExtractor.Tests.csproj /p:Configuration=Debug /v:minimal /m /warnaserror - name: Setup VSTest uses: darenm/Setup-VSTest@v1.2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 74c38f5..d175039 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,8 +24,15 @@ concurrency: jobs: build-and-publish: runs-on: windows-latest + + # Require environment approval based on branch + environment: + name: ${{ github.ref_name == 'main' && 'production' || 'development' }} + url: https://github.com/${{ github.repository }}/releases/tag/${{ steps.version.outputs.TAG_NAME }} + permissions: contents: write + steps: - uses: actions/checkout@v4 with: From 62c2926ced2b5b4ca45ed8fa7ad3743ab816ae45 Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 16:06:17 +1100 Subject: [PATCH 12/20] Update .github/workflows/release.yml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d175039..8ee7722 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,6 @@ jobs: # Require environment approval based on branch environment: name: ${{ github.ref_name == 'main' && 'production' || 'development' }} - url: https://github.com/${{ github.repository }}/releases/tag/${{ steps.version.outputs.TAG_NAME }} permissions: contents: write From bc79e7ac8f9e8c6f1aff9edc1fd78c84df02d5a8 Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 16:08:01 +1100 Subject: [PATCH 13/20] Add environment URL to release workflow Sets the environment URL in the release workflow to point to the repository's releases page for better visibility and tracking. --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8ee7722..78c479d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,6 +28,7 @@ jobs: # Require environment approval based on branch environment: name: ${{ github.ref_name == 'main' && 'production' || 'development' }} + url: https://github.com/${{ github.repository }}/releases permissions: contents: write From 99a00e0ba340633262c7414b9491da994bdababa Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 16:12:23 +1100 Subject: [PATCH 14/20] Improve manifest version extraction in release workflow Updated sed patterns in the release workflow to more accurately match the Identity element's Version attribute in the VSIX manifest. This ensures only the correct attribute is extracted and updated, improving reliability of version management. --- .github/workflows/release.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 78c479d..7c57708 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -26,7 +26,7 @@ jobs: runs-on: windows-latest # Require environment approval based on branch - environment: + environment: name: ${{ github.ref_name == 'main' && 'production' || 'development' }} url: https://github.com/${{ github.repository }}/releases @@ -106,7 +106,7 @@ jobs: MANIFEST_FILE="InterfaceExtractor.Extension/source.extension.vsixmanifest" # Extract version from Identity element specifically - CURRENT_VERSION=$(sed -n 's/.*]*Version="\([^"]*\)".*/\1/p' "$MANIFEST_FILE") if [ -z "$CURRENT_VERSION" ]; then echo "โŒ Could not read version from manifest" @@ -185,11 +185,11 @@ jobs: echo "New version will be: $NEW_VERSION (display: $DISPLAY_VERSION)" - # Update ONLY the Identity element's Version attribute (not PackageManifest) - sed -i.bak 's/\(]*Version="\)[^"]*\(".*\)/\1'"${NEW_VERSION}"'\2/' "$MANIFEST_FILE" # Verify the change - NEW_VERSION_CHECK=$(sed -n 's/.*]*Version="\([^"]*\)".*/\1/p' "$MANIFEST_FILE") echo "Verified new version in manifest: $NEW_VERSION_CHECK" if [ "$NEW_VERSION_CHECK" != "$NEW_VERSION" ]; then @@ -204,6 +204,7 @@ jobs: echo "IS_PRERELEASE=$IS_PRERELEASE" >> $GITHUB_OUTPUT echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_OUTPUT echo "RELEASE_TYPE=$RELEASE_TYPE" >> $GITHUB_OUTPUT + - name: Build Extension run: msbuild InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj /p:Configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:minimal /m From 2f3e9e73fd57a92b4989a23b034099b9c12bde8b Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 16:14:55 +1100 Subject: [PATCH 15/20] Refactor version bump step to PowerShell Replaces the bash/sed-based auto-increment logic in the release workflow with PowerShell, using XML parsing for more robust version extraction and update. This improves Windows compatibility and reliability when updating the VSIX manifest version. --- .github/workflows/release.yml | 176 ++++++++++++++++++---------------- 1 file changed, 95 insertions(+), 81 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7c57708..7ad3928 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -100,111 +100,125 @@ jobs: - name: Auto-increment version id: version - shell: bash + shell: pwsh run: | - # Read current version from vsixmanifest using sed (Windows compatible) - MANIFEST_FILE="InterfaceExtractor.Extension/source.extension.vsixmanifest" + # Read current version from vsixmanifest using PowerShell XML parsing + $manifestFile = "InterfaceExtractor.Extension/source.extension.vsixmanifest" - # Extract version from Identity element specifically - CURRENT_VERSION=$(sed -n 's/.*]*Version="\([^"]*\)".*/\1/p' "$MANIFEST_FILE") + # Load XML properly + [xml]$manifest = Get-Content $manifestFile + $currentVersion = $manifest.PackageManifest.Metadata.Identity.Version - if [ -z "$CURRENT_VERSION" ]; then - echo "โŒ Could not read version from manifest" + if ([string]::IsNullOrEmpty($currentVersion)) { + Write-Host "โŒ Could not read version from manifest" exit 1 - fi + } - echo "Current version: $CURRENT_VERSION" + Write-Host "Current version: $currentVersion" - BUMP_TYPE="${{ steps.version-bump.outputs.BUMP_TYPE }}" - BRANCH_NAME="${{ github.ref_name }}" + $bumpType = "${{ steps.version-bump.outputs.BUMP_TYPE }}" + $branchName = "${{ github.ref_name }}" # Parse version components - IFS='.' read -r MAJOR MINOR PATCH BUILD <<< "$CURRENT_VERSION" + $versionParts = $currentVersion.Split('.') + $major = [int]$versionParts[0] + $minor = [int]$versionParts[1] + $patch = [int]$versionParts[2] - # Determine new version based on bump type (for main branch) - if [[ "$BUMP_TYPE" == "major" ]]; then - MAJOR=$((MAJOR + 1)) - MINOR=0 - PATCH=0 - elif [[ "$BUMP_TYPE" == "minor" ]]; then - MINOR=$((MINOR + 1)) - PATCH=0 - else - PATCH=$((PATCH + 1)) - fi + # Determine new version based on bump type + if ($bumpType -eq "major") { + $major++ + $minor = 0 + $patch = 0 + } + elseif ($bumpType -eq "minor") { + $minor++ + $patch = 0 + } + else { + $patch++ + } - BASE_VERSION="${MAJOR}.${MINOR}.${PATCH}" + $baseVersion = "$major.$minor.$patch" # Determine prerelease type based on branch - if [[ "$BRANCH_NAME" == *"testing"* ]]; then + if ($branchName -like "*testing*") { # Testing branches: find the next testing prerelease number - LAST_TESTING_TAG=$(git tag -l "v${BASE_VERSION}-testing.*" --sort=-version:refname | head -n 1) - if [ -z "$LAST_TESTING_TAG" ]; then - PRERELEASE_NUM=0 - else - LAST_NUM=$(echo "$LAST_TESTING_TAG" | sed -n 's/.*-testing\.\([0-9]*\).*/\1/p') - PRERELEASE_NUM=$((LAST_NUM + 1)) - fi + $lastTestingTag = git tag -l "v$baseVersion-testing.*" --sort=-version:refname | Select-Object -First 1 + + if ([string]::IsNullOrEmpty($lastTestingTag)) { + $prereleaseNum = 0 + } + else { + $lastTestingTag -match 'testing\.(\d+)' | Out-Null + $prereleaseNum = [int]$matches[1] + 1 + } - PRERELEASE_NUM=$(printf "%02d" $PRERELEASE_NUM) - NEW_VERSION="${BASE_VERSION}.${PRERELEASE_NUM}" - DISPLAY_VERSION="${BASE_VERSION}-testing.${PRERELEASE_NUM}" - IS_PRERELEASE="true" - TAG_NAME="v${DISPLAY_VERSION}" - RELEASE_NAME="v${DISPLAY_VERSION} ๐Ÿงช Testing Release" - RELEASE_TYPE="testing" - echo "๐Ÿงช Testing version: $DISPLAY_VERSION" - elif [[ "$BRANCH_NAME" == "dev" ]]; then + $prereleaseNum = $prereleaseNum.ToString("00") + $newVersion = "$baseVersion.$prereleaseNum" + $displayVersion = "$baseVersion-testing.$prereleaseNum" + $isPrerelease = "true" + $tagName = "v$displayVersion" + $releaseName = "v$displayVersion ๐Ÿงช Testing Release" + $releaseType = "testing" + Write-Host "๐Ÿงช Testing version: $displayVersion" + } + elseif ($branchName -eq "dev") { # Dev branch: find the next dev prerelease number - LAST_DEV_TAG=$(git tag -l "v${BASE_VERSION}-dev.*" --sort=-version:refname | head -n 1) - if [ -z "$LAST_DEV_TAG" ]; then - PRERELEASE_NUM=0 - else - LAST_NUM=$(echo "$LAST_DEV_TAG" | sed -n 's/.*-dev\.\([0-9]*\).*/\1/p') - PRERELEASE_NUM=$((LAST_NUM + 1)) - fi + $lastDevTag = git tag -l "v$baseVersion-dev.*" --sort=-version:refname | Select-Object -First 1 - PRERELEASE_NUM=$(printf "%02d" $PRERELEASE_NUM) - NEW_VERSION="${BASE_VERSION}.${PRERELEASE_NUM}" - DISPLAY_VERSION="${BASE_VERSION}-dev.${PRERELEASE_NUM}" - IS_PRERELEASE="true" - TAG_NAME="v${DISPLAY_VERSION}" - RELEASE_NAME="v${DISPLAY_VERSION} ๐Ÿ”ง Dev Release" - RELEASE_TYPE="dev" - echo "๐Ÿ”ง Dev version: $DISPLAY_VERSION" - else + if ([string]::IsNullOrEmpty($lastDevTag)) { + $prereleaseNum = 0 + } + else { + $lastDevTag -match 'dev\.(\d+)' | Out-Null + $prereleaseNum = [int]$matches[1] + 1 + } + + $prereleaseNum = $prereleaseNum.ToString("00") + $newVersion = "$baseVersion.$prereleaseNum" + $displayVersion = "$baseVersion-dev.$prereleaseNum" + $isPrerelease = "true" + $tagName = "v$displayVersion" + $releaseName = "v$displayVersion ๐Ÿ”ง Dev Release" + $releaseType = "dev" + Write-Host "๐Ÿ”ง Dev version: $displayVersion" + } + else { # Main branch: production release - NEW_VERSION="${BASE_VERSION}.0" - DISPLAY_VERSION="${BASE_VERSION}" - IS_PRERELEASE="false" - TAG_NAME="v${DISPLAY_VERSION}" - RELEASE_NAME="v${DISPLAY_VERSION} Release" - RELEASE_TYPE="production" - echo "๐Ÿ“ฆ Production version: $DISPLAY_VERSION (${BUMP_TYPE} bump)" - fi + $newVersion = "$baseVersion.0" + $displayVersion = $baseVersion + $isPrerelease = "false" + $tagName = "v$displayVersion" + $releaseName = "v$displayVersion Release" + $releaseType = "production" + Write-Host "๐Ÿ“ฆ Production version: $displayVersion ($bumpType bump)" + } - echo "New version will be: $NEW_VERSION (display: $DISPLAY_VERSION)" + Write-Host "New version will be: $newVersion (display: $displayVersion)" - # Update ONLY the Identity element's Version attribute - sed -i.bak 's/\(]*Version="\)[^"]*\(".*\)/\1'"${NEW_VERSION}"'\2/' "$MANIFEST_FILE" + # Update version in XML using proper XML manipulation + $manifest.PackageManifest.Metadata.Identity.Version = $newVersion + $manifest.Save((Resolve-Path $manifestFile)) # Verify the change - NEW_VERSION_CHECK=$(sed -n 's/.*]*Version="\([^"]*\)".*/\1/p' "$MANIFEST_FILE") - echo "Verified new version in manifest: $NEW_VERSION_CHECK" + [xml]$verifyManifest = Get-Content $manifestFile + $newVersionCheck = $verifyManifest.PackageManifest.Metadata.Identity.Version + Write-Host "Verified new version in manifest: $newVersionCheck" - if [ "$NEW_VERSION_CHECK" != "$NEW_VERSION" ]; then - echo "โŒ Version update failed!" + if ($newVersionCheck -ne $newVersion) { + Write-Host "โŒ Version update failed!" exit 1 - fi + } - echo "VERSION=$NEW_VERSION" >> $GITHUB_OUTPUT - echo "DISPLAY_VERSION=$DISPLAY_VERSION" >> $GITHUB_OUTPUT - echo "TAG_NAME=$TAG_NAME" >> $GITHUB_OUTPUT - echo "BUMP_TYPE=$BUMP_TYPE" >> $GITHUB_OUTPUT - echo "IS_PRERELEASE=$IS_PRERELEASE" >> $GITHUB_OUTPUT - echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_OUTPUT - echo "RELEASE_TYPE=$RELEASE_TYPE" >> $GITHUB_OUTPUT - + # Set outputs + "VERSION=$newVersion" | Out-File -FilePath $env:GITHUB_OUTPUT -Append + "DISPLAY_VERSION=$displayVersion" | Out-File -FilePath $env:GITHUB_OUTPUT -Append + "TAG_NAME=$tagName" | Out-File -FilePath $env:GITHUB_OUTPUT -Append + "BUMP_TYPE=$bumpType" | Out-File -FilePath $env:GITHUB_OUTPUT -Append + "IS_PRERELEASE=$isPrerelease" | Out-File -FilePath $env:GITHUB_OUTPUT -Append + "RELEASE_NAME=$releaseName" | Out-File -FilePath $env:GITHUB_OUTPUT -Append + "RELEASE_TYPE=$releaseType" | Out-File -FilePath $env:GITHUB_OUTPUT -Append - name: Build Extension run: msbuild InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj /p:Configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:minimal /m From 6950819fe50e72ec7c63894b85b453ce484e2b27 Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 16:15:37 +1100 Subject: [PATCH 16/20] Trigger release workflow on testing branches Added pattern to match branches containing 'testing' in their name, enabling the release workflow to run on those branches as well as main and dev. --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7ad3928..1aefb72 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,6 +8,7 @@ on: branches: - main - dev + - '*testing*' # Matches any branch with 'testing' in its name paths: - '**.cs' - '**.csproj' From f87ae31eac8160d30b3dfaa89ef94bc976ed6e3d Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 16:20:22 +1100 Subject: [PATCH 17/20] Improve prerelease and dev tag parsing in release workflow Adds explicit checks for tag format when incrementing prerelease and dev version numbers. If the tag cannot be parsed, a warning is logged and numbering starts from 0, improving robustness and error visibility in the release workflow. --- .github/workflows/release.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1aefb72..5b8c5b5 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -150,10 +150,13 @@ jobs: if ([string]::IsNullOrEmpty($lastTestingTag)) { $prereleaseNum = 0 } - else { - $lastTestingTag -match 'testing\.(\d+)' | Out-Null + elseif ($lastTestingTag -match 'testing\.(\d+)') { $prereleaseNum = [int]$matches[1] + 1 } + else { + Write-Host "โš ๏ธ Warning: Could not parse testing tag '$lastTestingTag', starting from 0" + $prereleaseNum = 0 + } $prereleaseNum = $prereleaseNum.ToString("00") $newVersion = "$baseVersion.$prereleaseNum" @@ -171,10 +174,13 @@ jobs: if ([string]::IsNullOrEmpty($lastDevTag)) { $prereleaseNum = 0 } - else { - $lastDevTag -match 'dev\.(\d+)' | Out-Null + elseif ($lastDevTag -match 'dev\.(\d+)') { $prereleaseNum = [int]$matches[1] + 1 } + else { + Write-Host "โš ๏ธ Warning: Could not parse dev tag '$lastDevTag', starting from 0" + $prereleaseNum = 0 + } $prereleaseNum = $prereleaseNum.ToString("00") $newVersion = "$baseVersion.$prereleaseNum" @@ -220,6 +226,7 @@ jobs: "IS_PRERELEASE=$isPrerelease" | Out-File -FilePath $env:GITHUB_OUTPUT -Append "RELEASE_NAME=$releaseName" | Out-File -FilePath $env:GITHUB_OUTPUT -Append "RELEASE_TYPE=$releaseType" | Out-File -FilePath $env:GITHUB_OUTPUT -Append + - name: Build Extension run: msbuild InterfaceExtractor.Extension/InterfaceExtractor.Extension.csproj /p:Configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:minimal /m From 82ad18ba391e05655fd345f0a4eb317584419f41 Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 16:28:13 +1100 Subject: [PATCH 18/20] Remove testing branch trigger from release workflow The release workflow will no longer be triggered by branches containing 'testing' in their name. This change limits workflow runs to 'main' and 'dev' branches only. --- .github/workflows/release.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5b8c5b5..f0b455f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,6 @@ on: branches: - main - dev - - '*testing*' # Matches any branch with 'testing' in its name paths: - '**.cs' - '**.csproj' From 380d76b6b0ca2be2596723599e989126b90c5feb Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 16:31:11 +1100 Subject: [PATCH 19/20] Ignore docs and release workflow in PR tests Updated the PR tests workflow to ignore changes in the release workflow, README.md, and docs directory, preventing unnecessary test runs for documentation and release config changes. --- .github/workflows/pr-tests.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index 6fa06bf..6c748fb 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -18,6 +18,10 @@ on: - '**.vsct' - '**.vsixmanifest' - '.github/workflows/pr-tests.yml' + paths-ignore: + - '.github/workflows/release.yml' + - 'README.md' + - 'docs/**' # Cancel in-progress runs when new commits are pushed concurrency: From b26c8090ebf455f206238581fadfec0a9a19bf03 Mon Sep 17 00:00:00 2001 From: Abdul-Kadir Coskun <59434446+Chizaruu@users.noreply.github.com> Date: Sat, 18 Oct 2025 16:34:40 +1100 Subject: [PATCH 20/20] Revert "Ignore docs and release workflow in PR tests" This reverts commit 380d76b6b0ca2be2596723599e989126b90c5feb. --- .github/workflows/pr-tests.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml index 6c748fb..6fa06bf 100644 --- a/.github/workflows/pr-tests.yml +++ b/.github/workflows/pr-tests.yml @@ -18,10 +18,6 @@ on: - '**.vsct' - '**.vsixmanifest' - '.github/workflows/pr-tests.yml' - paths-ignore: - - '.github/workflows/release.yml' - - 'README.md' - - 'docs/**' # Cancel in-progress runs when new commits are pushed concurrency: