diff --git a/.azure/pipelines/ci-public.yml b/.azure/pipelines/ci-public.yml index e79221844861..00ef92c8c00b 100644 --- a/.azure/pipelines/ci-public.yml +++ b/.azure/pipelines/ci-public.yml @@ -582,10 +582,10 @@ stages: /p:VsTestUseMSBuildOutput=false displayName: Build shared fx # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the previous step. - - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -nobl -all -noBuildRepoTasks -noBuildNative -noBuild -test + - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -all -noBuildRepoTasks -noBuildNative -noBuild -test -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) - /p:VsTestUseMSBuildOutput=false + /p:VsTestUseMSBuildOutput=false /p:RunTemplateTests=false displayName: Run build.cmd helix target env: HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 5689fb05c99c..8ce211f0a907 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -634,9 +634,9 @@ extends: MSBUILDUSESERVER: "1" displayName: Build shared fx # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the previous step. - - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -nobl -all -noBuildRepoTasks -noBuildNative -noBuild -test + - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -all -noBuildRepoTasks -noBuildNative -noBuild -test -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true - /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) + /p:CrossgenOutput=false /p:RunTemplateTests=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) displayName: Run build.cmd helix target env: HelixApiAccessToken: $(HelixApiAccessToken) # Needed for internal queues diff --git a/.azure/pipelines/template-tests-pr.yml b/.azure/pipelines/template-tests-pr.yml new file mode 100644 index 000000000000..9bb3bfdff95a --- /dev/null +++ b/.azure/pipelines/template-tests-pr.yml @@ -0,0 +1,50 @@ +# Configure which branches trigger builds +# We want to run template tests on release/8.0 and later as well as on certain PRs +trigger: + batch: true + branches: + include: + - main + - release/* + +# Run PR validation on branches that include Helix tests +pr: + autoCancel: true + branches: + include: + - main + - release/* + paths: + include: + - src/ProjectTemplates/**/* + +variables: +- name: _UseHelixOpenQueues + value: ${{ ne(variables['System.TeamProject'], 'internal') }} +- ${{ if eq(variables['System.TeamProject'], 'internal') }}: + - group: DotNet-HelixApi-Access +- template: /eng/common/templates/variables/pool-providers.yml + +jobs: +- template: jobs/default-build.yml + parameters: + jobName: Helix_templates_x64 + jobDisplayName: 'Tests: Helix template tests x64' + agentOs: Windows + timeoutInMinutes: 180 + steps: + # Build the shared framework + - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -nobl -all -pack -arch x64 + /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) + /p:VsTestUseMSBuildOutput=false + displayName: Build shared fx + # -noBuildRepoTasks -noBuildNative -noBuild to avoid repeating work done in the previous step. + - script: ./eng/build.cmd -ci -prepareMachine -nativeToolsOnMachine -all -noBuildRepoTasks -noBuildNative -noBuild -test + -projects eng\helix\helix.proj /p:IsHelixPRCheck=true /p:IsHelixJob=true + /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs) + /p:VsTestUseMSBuildOutput=false /p:OnlyTestProjectTemplates=true + displayName: Run build.cmd helix target + artifacts: + - name: Helix_logs + path: artifacts/log/ + publishOnError: true diff --git a/eng/Build.props b/eng/Build.props index e26389347316..b447810b064b 100644 --- a/eng/Build.props +++ b/eng/Build.props @@ -9,7 +9,7 @@ the format is correct) and undo any temporary changes. When complete, only BuildAfterTargetingPack.csproj and other @(RequiresDelayedBuild) projects should mention projects listed in RequiresDelayedBuildProjects.props. --> - + diff --git a/eng/helix/helix.proj b/eng/helix/helix.proj index 4934d54fdc2d..e3d34a926045 100644 --- a/eng/helix/helix.proj +++ b/eng/helix/helix.proj @@ -6,6 +6,7 @@ This must be reset in order for Build.props to evaluate a list of projects to be tested on Helix. --> + $(RepoRoot)src\ProjectTemplates\test\**\*.csproj