From 3da0453b43a7406be075a4e6f30541a76f64a9ff Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 31 Jan 2025 15:39:52 -0800 Subject: [PATCH 01/19] Add workflow powershell/PowerShell-CI-macos --- .github/workflows/powershell-ci-macos.yml | 109 ++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 .github/workflows/powershell-ci-macos.yml diff --git a/.github/workflows/powershell-ci-macos.yml b/.github/workflows/powershell-ci-macos.yml new file mode 100644 index 00000000000..d259ea69b8e --- /dev/null +++ b/.github/workflows/powershell-ci-macos.yml @@ -0,0 +1,109 @@ +name: powershell/PowerShell-CI-macos +on: + push: + branches: + - master + - release* + - feature* + paths: + - "*" + - "!tools/releaseBuild/**/*" + - "!.vsts-ci/misc-analysis.yml" + - "!.github/ISSUE_TEMPLATE/*" + - "!.github/workflows/*" + - "!.dependabot/config.yml" + - "!.pipelines/*" + - "!test/perf/*" + pull_request: + branches: + - master + - release* + - feature* + paths: + - "*" + - "!.dependabot/config.yml" + - "!.github/ISSUE_TEMPLATE/*" + - "!.github/workflows/*" + - "!.vsts-ci/misc-analysis.yml" + - "!.vsts-ci/windows.yml" + - "!.vsts-ci/windows/*" + - "!tools/cgmanifest.json" + - "!LICENSE.txt" + - "!test/common/markdown/*" + - "!test/perf/*" + - "!tools/packaging/*" + - "!tools/releaseBuild/*" + - "!tools/releaseBuild/azureDevOps/templates/*" + - "!README.md" + - "!.spelling" + - "!.pipelines/*" +env: + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + FORCE_FEATURE: 'False' + FORCE_PACKAGE: 'False' + HOMEBREW_NO_ANALYTICS: 1 + NUGET_KEY: none + POWERSHELL_TELEMETRY_OPTOUT: 1 + __SuppressAnsiEscapeSequences: 1 + nugetMultiFeedWarnLevel: none + system_debug: 'false' +jobs: + vsts_ci_templates_ci_build: + name: vsts_ci_templates_ci_build + uses: "./.github/workflows/vsts_ci_templates_ci_build.yml" + with: + pool: macOS-latest + jobName: mac_build + displayName: macOS Build + vsts_ci_templates_nix_test: + name: vsts_ci_templates_nix_test + needs: vsts_ci_templates_ci_build + uses: "./.github/workflows/vsts_ci_templates_nix_test.yml" + with: + purpose: UnelevatedPesterTests + tagSet: CI + vsts_ci_templates_nix_test_2: + name: vsts_ci_templates_nix_test_2 + needs: vsts_ci_templates_ci_build + uses: "./.github/workflows/vsts_ci_templates_nix_test.yml" + with: + purpose: ElevatedPesterTests + tagSet: CI + vsts_ci_templates_nix_test_3: + name: vsts_ci_templates_nix_test_3 + needs: vsts_ci_templates_ci_build + uses: "./.github/workflows/vsts_ci_templates_nix_test.yml" + with: + purpose: UnelevatedPesterTests + tagSet: Others + vsts_ci_templates_nix_test_4: + name: vsts_ci_templates_nix_test_4 + needs: vsts_ci_templates_ci_build + uses: "./.github/workflows/vsts_ci_templates_nix_test.yml" + with: + purpose: ElevatedPesterTests + tagSet: Others + vsts_ci_templates_verify_xunit: + name: vsts_ci_templates_verify_xunit + needs: vsts_ci_templates_ci_build + uses: "./.github/workflows/vsts_ci_templates_verify_xunit.yml" + with: + pool: macOS-latest + PackageMac-macos_packaging: + name: macOS packaging (bootstrap only) + needs: + - vsts_ci_templates_ci_build + runs-on: + - self-hosted + - macOS-latest + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + - uses: actions/checkout@v4.1.0 + - name: Bootstrap packaging + if: success() || failure() + run: |- + import-module ./build.psm1 + start-psbootstrap -package + shell: pwsh From 2f343e1a815e9f79da9c3368758fe68173b77bd6 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 31 Jan 2025 15:46:00 -0800 Subject: [PATCH 02/19] update to use existing actions update to use existing actions --- .github/workflows/macos-ci.yml | 132 ++++++++++++++++++++++ .github/workflows/powershell-ci-macos.yml | 109 ------------------ 2 files changed, 132 insertions(+), 109 deletions(-) create mode 100644 .github/workflows/macos-ci.yml delete mode 100644 .github/workflows/powershell-ci-macos.yml diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml new file mode 100644 index 00000000000..ebadd45f41d --- /dev/null +++ b/.github/workflows/macos-ci.yml @@ -0,0 +1,132 @@ +name: powershell/PowerShell-CI-macos +on: + push: + branches: + - master + - release* + - feature* + paths: + - "**" + - "!.github/ISSUE_TEMPLATE/**" + - "!.dependabot/config.yml" + - "!.pipelines/**" + - "!test/perf/**" + pull_request: + branches: + - master + - release* + - feature* + paths: + - ".github/actions/**" + - ".github/workflows/macos-ci.yml" + - "**.props" + - build.psm1 + - src/** + - test/** + - tools/buildCommon/** + - tools/ci.psm1 + - "!test/common/markdown/**" + - "!test/perf/**" + +env: + DOTNET_CLI_TELEMETRY_OPTOUT: 1 + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + FORCE_FEATURE: 'False' + FORCE_PACKAGE: 'False' + HOMEBREW_NO_ANALYTICS: 1 + NUGET_KEY: none + POWERSHELL_TELEMETRY_OPTOUT: 1 + __SuppressAnsiEscapeSequences: 1 + nugetMultiFeedWarnLevel: none + system_debug: 'false' +jobs: + ci_build: + name: Build PowerShell + runs-on: macos-latest + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + with: + fetch-depth: 1000 + - name: Build + uses: "./.github/actions/build/ci" + macos_test_unelevated_ci: + name: macos Unelevated CI + needs: ci_build + runs-on: macos-latest + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + with: + fetch-depth: 1000 + - name: macOS Unelevated CI + uses: "./.github/actions/test/nix" + with: + purpose: UnelevatedPesterTests + tagSet: CI + macos_test_elevated_ci: + name: macOS Elevated CI + needs: ci_build + runs-on: macos-latest + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + with: + fetch-depth: 1000 + - name: macOS Elevated CI + uses: "./.github/actions/test/nix" + with: + purpose: ElevatedPesterTests + tagSet: CI + macos_test_unelevated_others: + name: macOS Unelevated Others + needs: ci_build + runs-on: macos-latest + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + with: + fetch-depth: 1000 + - name: macOS Unelevated Others + uses: "./.github/actions/test/nix" + with: + purpose: UnelevatedPesterTests + tagSet: Others + macos_test_elevated_others: + name: macOS Elevated Others + needs: ci_build + runs-on: macos-latest + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + with: + fetch-depth: 1000 + - name: macOS Elevated Others + uses: "./.github/actions/test/nix" + with: + purpose: ElevatedPesterTests + tagSet: Others + verify_xunit: + name: Verify xUnit test results + needs: ci_build + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + with: + fetch-depth: 1000 + - name: Verify xUnit test results + uses: "./.github/actions/test/verify_xunit" + PackageMac-macos_packaging: + name: macOS packaging (bootstrap only) + runs-on: + - macos-latest + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + - name: Bootstrap packaging + if: success() || failure() + run: |- + import-module ./build.psm1 + start-psbootstrap -package + shell: pwsh diff --git a/.github/workflows/powershell-ci-macos.yml b/.github/workflows/powershell-ci-macos.yml deleted file mode 100644 index d259ea69b8e..00000000000 --- a/.github/workflows/powershell-ci-macos.yml +++ /dev/null @@ -1,109 +0,0 @@ -name: powershell/PowerShell-CI-macos -on: - push: - branches: - - master - - release* - - feature* - paths: - - "*" - - "!tools/releaseBuild/**/*" - - "!.vsts-ci/misc-analysis.yml" - - "!.github/ISSUE_TEMPLATE/*" - - "!.github/workflows/*" - - "!.dependabot/config.yml" - - "!.pipelines/*" - - "!test/perf/*" - pull_request: - branches: - - master - - release* - - feature* - paths: - - "*" - - "!.dependabot/config.yml" - - "!.github/ISSUE_TEMPLATE/*" - - "!.github/workflows/*" - - "!.vsts-ci/misc-analysis.yml" - - "!.vsts-ci/windows.yml" - - "!.vsts-ci/windows/*" - - "!tools/cgmanifest.json" - - "!LICENSE.txt" - - "!test/common/markdown/*" - - "!test/perf/*" - - "!tools/packaging/*" - - "!tools/releaseBuild/*" - - "!tools/releaseBuild/azureDevOps/templates/*" - - "!README.md" - - "!.spelling" - - "!.pipelines/*" -env: - DOTNET_CLI_TELEMETRY_OPTOUT: 1 - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - FORCE_FEATURE: 'False' - FORCE_PACKAGE: 'False' - HOMEBREW_NO_ANALYTICS: 1 - NUGET_KEY: none - POWERSHELL_TELEMETRY_OPTOUT: 1 - __SuppressAnsiEscapeSequences: 1 - nugetMultiFeedWarnLevel: none - system_debug: 'false' -jobs: - vsts_ci_templates_ci_build: - name: vsts_ci_templates_ci_build - uses: "./.github/workflows/vsts_ci_templates_ci_build.yml" - with: - pool: macOS-latest - jobName: mac_build - displayName: macOS Build - vsts_ci_templates_nix_test: - name: vsts_ci_templates_nix_test - needs: vsts_ci_templates_ci_build - uses: "./.github/workflows/vsts_ci_templates_nix_test.yml" - with: - purpose: UnelevatedPesterTests - tagSet: CI - vsts_ci_templates_nix_test_2: - name: vsts_ci_templates_nix_test_2 - needs: vsts_ci_templates_ci_build - uses: "./.github/workflows/vsts_ci_templates_nix_test.yml" - with: - purpose: ElevatedPesterTests - tagSet: CI - vsts_ci_templates_nix_test_3: - name: vsts_ci_templates_nix_test_3 - needs: vsts_ci_templates_ci_build - uses: "./.github/workflows/vsts_ci_templates_nix_test.yml" - with: - purpose: UnelevatedPesterTests - tagSet: Others - vsts_ci_templates_nix_test_4: - name: vsts_ci_templates_nix_test_4 - needs: vsts_ci_templates_ci_build - uses: "./.github/workflows/vsts_ci_templates_nix_test.yml" - with: - purpose: ElevatedPesterTests - tagSet: Others - vsts_ci_templates_verify_xunit: - name: vsts_ci_templates_verify_xunit - needs: vsts_ci_templates_ci_build - uses: "./.github/workflows/vsts_ci_templates_verify_xunit.yml" - with: - pool: macOS-latest - PackageMac-macos_packaging: - name: macOS packaging (bootstrap only) - needs: - - vsts_ci_templates_ci_build - runs-on: - - self-hosted - - macOS-latest - steps: - - name: checkout - uses: actions/checkout@v4.1.0 - - uses: actions/checkout@v4.1.0 - - name: Bootstrap packaging - if: success() || failure() - run: |- - import-module ./build.psm1 - start-psbootstrap -package - shell: pwsh From de51da35fc8315b06c9246c27100e2a5a9c3aa58 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 31 Jan 2025 16:09:12 -0800 Subject: [PATCH 03/19] fix names --- .github/workflows/macos-ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml index ebadd45f41d..3661363b155 100644 --- a/.github/workflows/macos-ci.yml +++ b/.github/workflows/macos-ci.yml @@ -1,4 +1,7 @@ -name: powershell/PowerShell-CI-macos +name: macOS-CI + +run-name: "${{ github.ref_name }} - ${{ github.run_number }}" + on: push: branches: From b66153b79ef5e3da5a0c1a5a65f3bb85ab055906 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Fri, 31 Jan 2025 16:28:07 -0800 Subject: [PATCH 04/19] disable linux stages that have been moved to github actions --- .vsts-ci/linux.yml | 87 ---------------------------------------------- 1 file changed, 87 deletions(-) diff --git a/.vsts-ci/linux.yml b/.vsts-ci/linux.yml index c1a1fd5c0ab..b1bb74197a0 100644 --- a/.vsts-ci/linux.yml +++ b/.vsts-ci/linux.yml @@ -79,93 +79,6 @@ stages: jobName: linux_build displayName: linux Build -- stage: TestUbuntu - displayName: Test for Ubuntu - dependsOn: [BuildLinuxStage] - jobs: - - template: templates/nix-test.yml - parameters: - name: Ubuntu - pool: ubuntu-20.04 - purpose: UnelevatedPesterTests - tagSet: CI - - - template: templates/nix-test.yml - parameters: - name: Ubuntu - pool: ubuntu-20.04 - purpose: ElevatedPesterTests - tagSet: CI - - - template: templates/nix-test.yml - parameters: - name: Ubuntu - pool: ubuntu-20.04 - purpose: UnelevatedPesterTests - tagSet: Others - - - template: templates/nix-test.yml - parameters: - name: Ubuntu - pool: ubuntu-20.04 - purpose: ElevatedPesterTests - tagSet: Others - - - template: templates/verify-xunit.yml - parameters: - pool: ubuntu-20.04 - -- stage: TestContainer - displayName: Test in a container - dependsOn: [BuildLinuxStage] - jobs: - - job: getContainerJob - displayName: Choose a container - pool: - vmImage: ubuntu-20.04 - steps: - - checkout: self - clean: true - - - checkout: Docker - clean: true - - - pwsh: | - # Initialize container test stage - Import-Module ./PowerShell/tools/ci.psm1 - Invoke-InitializeContainerStage -ContainerPattern '${{ parameters.ContainerPattern }}' - name: getContainerTask - displayName: Initialize Container Stage - continueOnError: true - - - template: templates/test/nix-container-test.yml - parameters: - name: container - pool: ubuntu-20.04 - purpose: UnelevatedPesterTests - tagSet: CI - - - template: templates/test/nix-container-test.yml - parameters: - name: container - pool: ubuntu-20.04 - purpose: ElevatedPesterTests - tagSet: CI - - - template: templates/test/nix-container-test.yml - parameters: - name: container - pool: ubuntu-20.04 - purpose: UnelevatedPesterTests - tagSet: Others - - - template: templates/test/nix-container-test.yml - parameters: - name: container - pool: ubuntu-20.04 - purpose: ElevatedPesterTests - tagSet: Others - - stage: PackageLinux displayName: Package Linux dependsOn: ["BuildLinuxStage"] From 32eb68145773ce967f8c9546dc658ad063ca6d2a Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 2 Feb 2025 13:23:13 -0800 Subject: [PATCH 05/19] Add 'ready_to_merge' job to macOS CI --- .github/workflows/macos-ci.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml index 3661363b155..e5749a12108 100644 --- a/.github/workflows/macos-ci.yml +++ b/.github/workflows/macos-ci.yml @@ -133,3 +133,16 @@ jobs: import-module ./build.psm1 start-psbootstrap -package shell: pwsh + ready_to_merge: + name: macos ready to merge + needs: + - verify_xunit + - PackageMac-macos_packaging + - macos_test_elevated_ci + - macos_test_elevated_others + - macos_test_unelevated_ci + - macos_test_unelevated_others + if: always() + uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@main + with: + needs_context: ${{ toJson(needs) }} From 893612979d9b1e62be6196435a0006ede7d44663 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 2 Feb 2025 13:26:48 -0800 Subject: [PATCH 06/19] Update .github/workflows/macos-ci.yml --- .github/workflows/macos-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml index e5749a12108..b653998a3fa 100644 --- a/.github/workflows/macos-ci.yml +++ b/.github/workflows/macos-ci.yml @@ -143,6 +143,6 @@ jobs: - macos_test_unelevated_ci - macos_test_unelevated_others if: always() - uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@main + uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@master with: needs_context: ${{ toJson(needs) }} From 64853adb125e2117bd69e8157d8d6a88d3ff7206 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 2 Feb 2025 13:43:41 -0800 Subject: [PATCH 07/19] Update linux-ci.yml --- .github/workflows/linux-ci.yml | 48 +++++++++++++++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 0709bee66c2..08a48ea93bd 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -44,9 +44,39 @@ env: nugetMultiFeedWarnLevel: none system_debug: 'false' jobs: + # JOB to run change detection + changes: + name: Change Detection + runs-on: ubuntu-latest + # Required permissions + permissions: + pull-requests: read + # Set job outputs to values from filter step + outputs: + source: ${{ steps.filter.outputs.source }} + steps: + # For pull requests it's not necessary to checkout the code + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + source: + - ".github/actions/**" + - ".github/workflows/linux-ci.yml" + - "**.props" + - build.psm1 + - src/** + - test/** + - tools/buildCommon/** + - tools/ci.psm1 + - tools/WindowsCI.psm1 + - "!test/common/markdown/**" + - "!test/perf/**" ci_build: name: Build PowerShell runs-on: ubuntu-20.04 + needs: changes + if: ${{ needs.changes.outputs.source == 'true' }} steps: - name: checkout uses: actions/checkout@v4.1.0 @@ -57,6 +87,7 @@ jobs: linux_test_unelevated_ci: name: Linux Unelevated CI needs: ci_build + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: ubuntu-20.04 steps: - name: checkout @@ -71,6 +102,7 @@ jobs: linux_test_elevated_ci: name: Linux Elevated CI needs: ci_build + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: ubuntu-20.04 steps: - name: checkout @@ -85,6 +117,7 @@ jobs: linux_test_unelevated_others: name: Linux Unelevated Others needs: ci_build + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: ubuntu-20.04 steps: - name: checkout @@ -99,6 +132,7 @@ jobs: linux_test_elevated_others: name: Linux Elevated Others needs: ci_build + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: ubuntu-20.04 steps: - name: checkout @@ -113,6 +147,7 @@ jobs: verify_xunit: name: Verify xUnit test results needs: ci_build + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: ubuntu-latest steps: - name: checkout @@ -121,7 +156,18 @@ jobs: fetch-depth: 1000 - name: Verify xUnit test results uses: "./.github/actions/test/verify_xunit" - + ready_to_merge: + name: macos ready to merge + needs: + - verify_xunit + - linux_test_elevated_ci + - linux_test_elevated_others + - linux_test_unelevated_ci + - linux_test_unelevated_others + if: always() + uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@master + with: + needs_context: ${{ toJson(needs) }} # TODO: Enable this when we have a Linux packaging workflow # ERROR: While executing gem ... (Gem::FilePermissionError) From 7283a7c1fea537d8c96f3589dc83ae90a69cf056 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 2 Feb 2025 13:45:28 -0800 Subject: [PATCH 08/19] Remove paths filter from linux-ci workflow --- .github/workflows/linux-ci.yml | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 08a48ea93bd..7d377cf8de1 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -21,18 +21,7 @@ on: - master - release* - feature* - paths: - - ".github/actions/**" - - ".github/workflows/linux-ci.yml" - - "**.props" - - build.psm1 - - src/** - - test/** - - tools/buildCommon/** - - tools/ci.psm1 - - tools/WindowsCI.psm1 - - "!test/common/markdown/**" - - "!test/perf/**" + env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 From f8f4e032896f5e61c0495920d3f809d8d1573c81 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 2 Feb 2025 13:47:47 -0800 Subject: [PATCH 09/19] Update Linux CI workflow configuration --- .github/workflows/linux-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 7d377cf8de1..17c1af47392 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -21,7 +21,7 @@ on: - master - release* - feature* - + env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 @@ -146,7 +146,7 @@ jobs: - name: Verify xUnit test results uses: "./.github/actions/test/verify_xunit" ready_to_merge: - name: macos ready to merge + name: Linux ready to merge needs: - verify_xunit - linux_test_elevated_ci From 0bbd00bcaa45b0b6ea105bf22b21997ddce71666 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 2 Feb 2025 13:51:20 -0800 Subject: [PATCH 10/19] Add concurrency control to Linux CI workflow --- .github/workflows/linux-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 17c1af47392..241384c0a61 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -22,6 +22,10 @@ on: - release* - feature* +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 From 34c8ec147448d1d0008a74925799ed18c1915801 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 2 Feb 2025 13:51:38 -0800 Subject: [PATCH 11/19] Add concurrency group to macOS CI workflow --- .github/workflows/macos-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml index b653998a3fa..ce889935c70 100644 --- a/.github/workflows/macos-ci.yml +++ b/.github/workflows/macos-ci.yml @@ -31,6 +31,10 @@ on: - "!test/common/markdown/**" - "!test/perf/**" +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 From da4f7a3b0ca7bc6fac5b209fcf1fae3ecbf45614 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 2 Feb 2025 13:55:44 -0800 Subject: [PATCH 12/19] Add concurrency group to Windows CI workflow --- .github/workflows/windows-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 718cd6ccf2b..d0fac8eccd3 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -30,6 +30,11 @@ on: - tools/WindowsCI.psm1 - "!test/common/markdown/**" - "!test/perf/**" + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + permissions: contents: read From acc3defb1f8bbcf4a4ad80d90f77d9f4dc9858be Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 2 Feb 2025 14:01:03 -0800 Subject: [PATCH 13/19] merge codeql analysis into linux ci --- .github/workflows/codeql-analysis.yml | 69 --------------------------- .github/workflows/linux-ci.yml | 55 ++++++++++++++++++++- 2 files changed, 54 insertions(+), 70 deletions(-) delete mode 100644 .github/workflows/codeql-analysis.yml diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml deleted file mode 100644 index c5b07ebdef8..00000000000 --- a/.github/workflows/codeql-analysis.yml +++ /dev/null @@ -1,69 +0,0 @@ -name: "CodeQL" - -on: - push: - branches: [master] - pull_request: - # The branches below must be a subset of the branches above - branches: [master] - -defaults: - run: - shell: pwsh - -env: - DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 - -permissions: - contents: read - -jobs: - analyze: - permissions: - actions: read # for github/codeql-action/init to get workflow details - contents: read # for actions/checkout to fetch code - security-events: write # for github/codeql-action/analyze to upload SARIF results - name: Analyze - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - # Override automatic language detection by changing the below list - # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] - language: ['csharp'] - # Learn more... - # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection - - steps: - - name: Checkout repository - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - with: - fetch-depth: '0' - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - - run: | - Get-ChildItem -Path env: | Out-String -width 9999 -Stream | write-Verbose -Verbose - name: Capture Environment - - - run: | - Import-Module .\tools\ci.psm1 - Invoke-CIInstall -SkipUser - name: Bootstrap - - - run: | - Import-Module .\tools\ci.psm1 - Invoke-CIBuild - name: Build - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9 diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 241384c0a61..1e24b391ee4 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -25,7 +25,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true - + env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 @@ -149,6 +149,58 @@ jobs: fetch-depth: 1000 - name: Verify xUnit test results uses: "./.github/actions/test/verify_xunit" + + analyze: + permissions: + actions: read # for github/codeql-action/init to get workflow details + contents: read # for actions/checkout to fetch code + security-events: write # for github/codeql-action/analyze to upload SARIF results + name: Analyze + runs-on: ubuntu-latest + needs: changes + if: ${{ needs.changes.outputs.source == 'true' }} + + strategy: + fail-fast: false + matrix: + # Override automatic language detection by changing the below list + # Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] + language: ['csharp'] + # Learn more... + # https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection + + steps: + - name: Checkout repository + uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + with: + fetch-depth: '0' + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. + # queries: ./path/to/local/query, your-org/your-repo/queries@main + + - run: | + Get-ChildItem -Path env: | Out-String -width 9999 -Stream | write-Verbose -Verbose + name: Capture Environment + + - run: | + Import-Module .\tools\ci.psm1 + Invoke-CIInstall -SkipUser + name: Bootstrap + + - run: | + Import-Module .\tools\ci.psm1 + Invoke-CIBuild + name: Build + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9 ready_to_merge: name: Linux ready to merge needs: @@ -157,6 +209,7 @@ jobs: - linux_test_elevated_others - linux_test_unelevated_ci - linux_test_unelevated_others + - analyze if: always() uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@master with: From c22306b009a476cd72687ead43a174f2ad9fbda9 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 2 Feb 2025 14:10:35 -0800 Subject: [PATCH 14/19] switch to read-to-merge model --- .github/workflows/linux-ci.yml | 23 ++++++--- .github/workflows/macos-ci.yml | 70 +++++++++++++++++++------- .github/workflows/windows-ci.yml | 85 ++++++++++++++++++++++++-------- 3 files changed, 133 insertions(+), 45 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 1e24b391ee4..9c30bf7d008 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -21,6 +21,7 @@ on: - master - release* - feature* +# Path filters for PRs need to go into the changes job concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -37,7 +38,6 @@ env: nugetMultiFeedWarnLevel: none system_debug: 'false' jobs: - # JOB to run change detection changes: name: Change Detection runs-on: ubuntu-latest @@ -62,7 +62,6 @@ jobs: - test/** - tools/buildCommon/** - tools/ci.psm1 - - tools/WindowsCI.psm1 - "!test/common/markdown/**" - "!test/perf/**" ci_build: @@ -79,7 +78,9 @@ jobs: uses: "./.github/actions/build/ci" linux_test_unelevated_ci: name: Linux Unelevated CI - needs: ci_build + needs: + - ci_build + - changes if: ${{ needs.changes.outputs.source == 'true' }} runs-on: ubuntu-20.04 steps: @@ -94,7 +95,9 @@ jobs: tagSet: CI linux_test_elevated_ci: name: Linux Elevated CI - needs: ci_build + needs: + - ci_build + - changes if: ${{ needs.changes.outputs.source == 'true' }} runs-on: ubuntu-20.04 steps: @@ -109,7 +112,9 @@ jobs: tagSet: CI linux_test_unelevated_others: name: Linux Unelevated Others - needs: ci_build + needs: + - ci_build + - changes if: ${{ needs.changes.outputs.source == 'true' }} runs-on: ubuntu-20.04 steps: @@ -124,7 +129,9 @@ jobs: tagSet: Others linux_test_elevated_others: name: Linux Elevated Others - needs: ci_build + needs: + - ci_build + - changes if: ${{ needs.changes.outputs.source == 'true' }} runs-on: ubuntu-20.04 steps: @@ -139,7 +146,9 @@ jobs: tagSet: Others verify_xunit: name: Verify xUnit test results - needs: ci_build + needs: + - ci_build + - changes if: ${{ needs.changes.outputs.source == 'true' }} runs-on: ubuntu-latest steps: diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml index ce889935c70..0ca1f23b817 100644 --- a/.github/workflows/macos-ci.yml +++ b/.github/workflows/macos-ci.yml @@ -19,22 +19,12 @@ on: - master - release* - feature* - paths: - - ".github/actions/**" - - ".github/workflows/macos-ci.yml" - - "**.props" - - build.psm1 - - src/** - - test/** - - tools/buildCommon/** - - tools/ci.psm1 - - "!test/common/markdown/**" - - "!test/perf/**" +# Path filters for PRs need to go into the changes job concurrency: group: ${{ github.workflow }}-${{ github.ref }} cancel-in-progress: true - + env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 @@ -47,9 +37,37 @@ env: nugetMultiFeedWarnLevel: none system_debug: 'false' jobs: + changes: + name: Change Detection + runs-on: ubuntu-latest + # Required permissions + permissions: + pull-requests: read + # Set job outputs to values from filter step + outputs: + source: ${{ steps.filter.outputs.source }} + steps: + # For pull requests it's not necessary to checkout the code + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + source: + - ".github/actions/**" + - ".github/workflows/macos-ci.yml" + - "**.props" + - build.psm1 + - src/** + - test/** + - tools/buildCommon/** + - tools/ci.psm1 + - "!test/common/markdown/**" + - "!test/perf/**" ci_build: name: Build PowerShell runs-on: macos-latest + needs: changes + if: ${{ needs.changes.outputs.source == 'true' }} steps: - name: checkout uses: actions/checkout@v4.1.0 @@ -59,7 +77,10 @@ jobs: uses: "./.github/actions/build/ci" macos_test_unelevated_ci: name: macos Unelevated CI - needs: ci_build + needs: + - ci_build + - changes + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: macos-latest steps: - name: checkout @@ -73,7 +94,10 @@ jobs: tagSet: CI macos_test_elevated_ci: name: macOS Elevated CI - needs: ci_build + needs: + - ci_build + - changes + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: macos-latest steps: - name: checkout @@ -87,7 +111,10 @@ jobs: tagSet: CI macos_test_unelevated_others: name: macOS Unelevated Others - needs: ci_build + needs: + - ci_build + - changes + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: macos-latest steps: - name: checkout @@ -101,7 +128,10 @@ jobs: tagSet: Others macos_test_elevated_others: name: macOS Elevated Others - needs: ci_build + needs: + - ci_build + - changes + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: macos-latest steps: - name: checkout @@ -115,7 +145,10 @@ jobs: tagSet: Others verify_xunit: name: Verify xUnit test results - needs: ci_build + needs: + - ci_build + - changes + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: ubuntu-latest steps: - name: checkout @@ -126,6 +159,9 @@ jobs: uses: "./.github/actions/test/verify_xunit" PackageMac-macos_packaging: name: macOS packaging (bootstrap only) + needs: + - changes + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: - macos-latest steps: diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index d0fac8eccd3..8c8bef4febe 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -18,18 +18,7 @@ on: - master - release* - feature* - paths: - - ".github/actions/**" - - ".github/workflows/windows-ci.yml" - - "**.props" - - build.psm1 - - src/** - - test/** - - tools/buildCommon/** - - tools/ci.psm1 - - tools/WindowsCI.psm1 - - "!test/common/markdown/**" - - "!test/perf/**" +# Path filters for PRs need to go into the changes job concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -59,9 +48,39 @@ jobs: fetch-depth: 1000 - name: Build uses: "./.github/actions/build/ci" - windows_test: + changes: + name: Change Detection + runs-on: ubuntu-latest + # Required permissions + permissions: + pull-requests: read + # Set job outputs to values from filter step + outputs: + source: ${{ steps.filter.outputs.source }} + steps: + # For pull requests it's not necessary to checkout the code + - uses: dorny/paths-filter@v3 + id: filter + with: + filters: | + source: + - ".github/actions/**" + - ".github/workflows/windows-ci.yml" + - "**.props" + - build.psm1 + - src/** + - test/** + - tools/buildCommon/** + - tools/ci.psm1 + - tools/WindowsCI.psm1 + - "!test/common/markdown/**" + - "!test/perf/**" + windows_test_unelevated_ci: name: Windows Unelevated CI - needs: ci_build + needs: + - ci_build + - changes + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: windows-latest steps: - name: checkout @@ -73,9 +92,12 @@ jobs: with: purpose: UnelevatedPesterTests tagSet: CI - windows_test_2: + windows_test_elevated_ci: name: Windows Elevated CI - needs: ci_build + needs: + - ci_build + - changes + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: windows-latest steps: - name: checkout @@ -87,9 +109,12 @@ jobs: with: purpose: ElevatedPesterTests tagSet: CI - windows_test_3: + windows_test_unelevated_others: name: Windows Unelevated Others - needs: ci_build + needs: + - ci_build + - changes + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: windows-latest steps: - name: checkout @@ -101,9 +126,12 @@ jobs: with: purpose: UnelevatedPesterTests tagSet: Others - windows_test_4: + windows_test_elevated_others: name: Windows Elevated Others - needs: ci_build + needs: + - ci_build + - changes + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: windows-latest steps: - name: checkout @@ -117,7 +145,10 @@ jobs: tagSet: Others verify_xunit: name: Verify xUnit test results - needs: ci_build + needs: + - ci_build + - changes + if: ${{ needs.changes.outputs.source == 'true' }} runs-on: windows-latest steps: - name: checkout @@ -126,3 +157,15 @@ jobs: fetch-depth: 1000 - name: Verify xUnit test results uses: "./.github/actions/test/verify_xunit" + ready_to_merge: + name: windows ready to merge + needs: + - verify_xunit + - windows_test_elevated_ci + - windows_test_elevated_others + - windows_test_unelevated_ci + - windows_test_unelevated_others + if: always() + uses: PowerShell/compliance/.github/workflows/ready-to-merge.yml@master + with: + needs_context: ${{ toJson(needs) }} From 4d98c0648ec65b3b3d783595f16147d6d8c76726 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 2 Feb 2025 14:12:36 -0800 Subject: [PATCH 15/19] fix build condition for windows --- .github/workflows/windows-ci.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 8c8bef4febe..006f24b8228 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -38,16 +38,6 @@ env: __SuppressAnsiEscapeSequences: 1 nugetMultiFeedWarnLevel: none jobs: - ci_build: - name: Build PowerShell - runs-on: windows-latest - steps: - - name: checkout - uses: actions/checkout@v4.1.0 - with: - fetch-depth: 1000 - - name: Build - uses: "./.github/actions/build/ci" changes: name: Change Detection runs-on: ubuntu-latest @@ -75,6 +65,18 @@ jobs: - tools/WindowsCI.psm1 - "!test/common/markdown/**" - "!test/perf/**" + ci_build: + name: Build PowerShell + needs: changes + if: ${{ needs.changes.outputs.source == 'true' }} + runs-on: windows-latest + steps: + - name: checkout + uses: actions/checkout@v4.1.0 + with: + fetch-depth: 1000 + - name: Build + uses: "./.github/actions/build/ci" windows_test_unelevated_ci: name: Windows Unelevated CI needs: From 6ba1ff294a67e3641a798a36ea0465656bc27bc7 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 2 Feb 2025 14:19:02 -0800 Subject: [PATCH 16/19] fix analyze workflow --- .github/workflows/linux-ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 9c30bf7d008..0ca08b17b31 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -197,19 +197,23 @@ jobs: - run: | Get-ChildItem -Path env: | Out-String -width 9999 -Stream | write-Verbose -Verbose name: Capture Environment + shell: pwsh - run: | Import-Module .\tools\ci.psm1 Invoke-CIInstall -SkipUser name: Bootstrap + shell: pwsh - run: | Import-Module .\tools\ci.psm1 Invoke-CIBuild name: Build + shell: pwsh - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9 + ready_to_merge: name: Linux ready to merge needs: From 029afc9c08a01a37cfb9737b59deff275629d62b Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 2 Feb 2025 14:23:35 -0800 Subject: [PATCH 17/19] Only cancel concurrent worflow if the worflow is a Pull Request --- .github/workflows/linux-ci.yml | 2 +- .github/workflows/macos-ci.yml | 2 +- .github/workflows/windows-ci.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 0ca08b17b31..58a58c9e543 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -25,7 +25,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ !contains(github.ref, 'merge')}}')}} env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml index 0ca1f23b817..5b3289c4f4a 100644 --- a/.github/workflows/macos-ci.yml +++ b/.github/workflows/macos-ci.yml @@ -23,7 +23,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ !contains(github.ref, 'merge')}}')}} env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 006f24b8228..82c0590aed2 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -22,7 +22,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true + cancel-in-progress: ${{ !contains(github.ref, 'merge')}}')}} permissions: contents: read From 6a87e64c440e398a7eb67f45d9c9238a064ebb72 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 2 Feb 2025 14:25:42 -0800 Subject: [PATCH 18/19] fix syntax --- .github/workflows/linux-ci.yml | 2 +- .github/workflows/macos-ci.yml | 2 +- .github/workflows/windows-ci.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index 58a58c9e543..b33f9dc0ca4 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -25,7 +25,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !contains(github.ref, 'merge')}}')}} + cancel-in-progress: ${{ !contains(github.ref, 'merge')}} env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml index 5b3289c4f4a..a134a797239 100644 --- a/.github/workflows/macos-ci.yml +++ b/.github/workflows/macos-ci.yml @@ -23,7 +23,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !contains(github.ref, 'merge')}}')}} + cancel-in-progress: ${{ !contains(github.ref, 'merge')}} env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index 82c0590aed2..ee2a3e32aa3 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -22,7 +22,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !contains(github.ref, 'merge')}}')}} + cancel-in-progress: ${{ !contains(github.ref, 'merge')}} permissions: contents: read From c6564cbe98b115a00c0b0cab2b6b5c512cda4e35 Mon Sep 17 00:00:00 2001 From: Travis Plunk Date: Sun, 2 Feb 2025 14:28:30 -0800 Subject: [PATCH 19/19] oops --- .github/workflows/linux-ci.yml | 2 +- .github/workflows/macos-ci.yml | 2 +- .github/workflows/windows-ci.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/linux-ci.yml b/.github/workflows/linux-ci.yml index b33f9dc0ca4..35c0bcaa132 100644 --- a/.github/workflows/linux-ci.yml +++ b/.github/workflows/linux-ci.yml @@ -25,7 +25,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !contains(github.ref, 'merge')}} + cancel-in-progress: ${{ contains(github.ref, 'merge')}} env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 diff --git a/.github/workflows/macos-ci.yml b/.github/workflows/macos-ci.yml index a134a797239..753f9f56dff 100644 --- a/.github/workflows/macos-ci.yml +++ b/.github/workflows/macos-ci.yml @@ -23,7 +23,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !contains(github.ref, 'merge')}} + cancel-in-progress: ${{ contains(github.ref, 'merge')}} env: DOTNET_CLI_TELEMETRY_OPTOUT: 1 diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml index ee2a3e32aa3..6f66d7b5c08 100644 --- a/.github/workflows/windows-ci.yml +++ b/.github/workflows/windows-ci.yml @@ -22,7 +22,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: ${{ !contains(github.ref, 'merge')}} + cancel-in-progress: ${{ contains(github.ref, 'merge')}} permissions: contents: read