Skip to content

Commit bd20ad0

Browse files
radicalCopilot
andcommitted
Make CLI end-to-end tests PR-only in GitHub Actions
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent acf10e0 commit bd20ad0

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

eng/Testing.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@
1111
<!-- Detect if we're running in the context of a GitHub pull request -->
1212
<IsGithubPullRequest Condition="'$(GITHUB_EVENT_NAME)' == 'pull_request'">true</IsGithubPullRequest>
1313

14+
<!-- See https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables -->
15+
<IsGitHubActionsRunner Condition="'$(GITHUB_ACTIONS)' == 'true'">true</IsGitHubActionsRunner>
16+
1417
<!-- By default any test can run on all test platforms -->
1518
<RunOnGithubActionsWindows>true</RunOnGithubActionsWindows>
1619
<RunOnGithubActionsLinux>true</RunOnGithubActionsLinux>

eng/Testing.targets

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<!--
44
Environment variables:
5-
- IsGitHubActionsRunner: indicates whether tests are currently run on GitHub Actions; computed, overridable. Locally this can be set by "/p:GITHUB_ACTIONS=true".
65
- IsAzdoCIRunner: indicates whether tests are currently run on Azure DevOps; computed, overridable. Locally this can be set by "/p:SYSTEM_TEAMPROJECT=foo".
76
- IsAzdoHelixRunner: indicates whether tests are currently run on Helix; computed, overridable. Locally this can be set by "/p:PrepareForHelix=true".
87
@@ -29,9 +28,6 @@
2928
-->
3029

3130
<PropertyGroup>
32-
<!-- See https://docs.github.com/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables -->
33-
<IsGitHubActionsRunner Condition=" '$(GITHUB_ACTIONS)' == 'true' ">true</IsGitHubActionsRunner>
34-
3531
<!-- See https://learn.microsoft.com/azure/devops/pipelines/build/variables#system-variables -->
3632
<IsAzdoCIRunner Condition=" '$(SYSTEM_TEAMPROJECT)' != '' ">true</IsAzdoCIRunner>
3733

tests/Aspire.Cli.EndToEnd.Tests/Aspire.Cli.EndToEnd.Tests.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
<IsTestProject>true</IsTestProject>
99
<IsUnitTestProject>true</IsUnitTestProject>
1010
<OutputType>Exe</OutputType>
11+
<SkipTests Condition="'$(IsGitHubActionsRunner)' == 'true' and '$(IsGithubPullRequest)' != 'true'">true</SkipTests>
1112

1213
<SplitTestsOnCI>true</SplitTestsOnCI>
1314
<RequiresNugets>true</RequiresNugets>

0 commit comments

Comments
 (0)