diff --git a/.azure/pipelines/ci.yml b/.azure/pipelines/ci.yml index 86073811670e..9d980567a9d0 100644 --- a/.azure/pipelines/ci.yml +++ b/.azure/pipelines/ci.yml @@ -31,6 +31,8 @@ variables: value: .NETCORE - name: _DotNetValidationArtifactsCategory value: .NETCORE +- name: PLAYWRIGHT_BROWSERS_PATH + value: $(System.DefaultWorkingDirectory)/.tools/playwright - name: PostBuildSign value: true - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}: @@ -659,6 +661,15 @@ stages: beforeBuild: - powershell: "& ./src/Servers/IIS/tools/UpdateIISExpressCertificate.ps1; & ./src/Servers/IIS/tools/update_schema.ps1" displayName: Setup IISExpress test certificates and schema + - task: Cache@2 + inputs: + key: 'pw | "$(Agent.OS)" | eng/versions.props' + path: $(PLAYWRIGHT_BROWSERS_PATH) + cacheHitVar: CACHE_PLAYWRIGHT_HIT + displayName: Cache playwright browsers + - script: npm i -D playwright + condition: ne(variables['CACHE_PLAYWRIGHT_HIT'], 'true') + artifacts: - name: Windows_Test_Dumps path: artifacts/dumps/ @@ -727,6 +738,15 @@ stages: agentOs: Windows timeoutInMinutes: 240 steps: + - task: Cache@2 + inputs: + key: 'pw | "$(Agent.OS)" | eng/versions.props' + path: $(PLAYWRIGHT_BROWSERS_PATH) + cacheHitVar: CACHE_PLAYWRIGHT_HIT + displayName: Cache playwright browsers + - script: npm i -D playwright + condition: ne(variables['CACHE_PLAYWRIGHT_HIT'], 'true') + # Build the shared framework - script: ./eng/build.cmd -ci -nobl -all -pack -arch x64 /p:CrossgenOutput=false /p:ASPNETCORE_TEST_LOG_DIR=artifacts/log $(_InternalRuntimeDownloadArgs)