2020-12-29 01:08:08 +01:00
|
|
|
trigger:
|
|
|
|
# Only run latest commit for branches:
|
|
|
|
batch: true
|
|
|
|
# Do not run Azure CI for docs-only/example-only changes:
|
|
|
|
paths:
|
|
|
|
include:
|
|
|
|
- '*'
|
|
|
|
exclude:
|
2021-01-05 02:41:42 +01:00
|
|
|
- bench
|
|
|
|
- docs
|
|
|
|
- errors
|
|
|
|
- examples
|
2020-12-29 01:08:08 +01:00
|
|
|
# Do not run Azure on `canary`, `master`, or release tags. This unnecessarily
|
|
|
|
# increases the backlog, and the change was already tested on the PR.
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- '*'
|
|
|
|
exclude:
|
|
|
|
- canary
|
|
|
|
- master
|
|
|
|
- refs/tags/*
|
|
|
|
|
2021-01-05 02:41:42 +01:00
|
|
|
pr:
|
|
|
|
# Do not run Azure CI for docs-only/example-only changes:
|
|
|
|
paths:
|
|
|
|
include:
|
|
|
|
- '*'
|
|
|
|
exclude:
|
|
|
|
- bench
|
|
|
|
- docs
|
|
|
|
- errors
|
|
|
|
- examples
|
|
|
|
|
2019-09-13 04:51:56 +02:00
|
|
|
variables:
|
2019-09-18 19:50:25 +02:00
|
|
|
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
|
2019-12-26 21:01:22 +01:00
|
|
|
NEXT_TELEMETRY_DISABLED: '1'
|
2021-10-15 22:55:14 +02:00
|
|
|
node_version: ^12.22.0
|
2019-12-26 21:01:22 +01:00
|
|
|
|
2020-11-09 06:56:39 +01:00
|
|
|
stages:
|
|
|
|
- stage: Build
|
|
|
|
jobs:
|
|
|
|
- job: build
|
|
|
|
pool:
|
|
|
|
vmImage: 'windows-2019'
|
|
|
|
steps:
|
|
|
|
- script: echo $(Agent.BuildDirectory)
|
|
|
|
- script: dir
|
|
|
|
- script: dir $(System.DefaultWorkingDirectory)
|
2020-11-09 07:43:24 +01:00
|
|
|
- script: echo $(Build.SourceVersion)
|
2020-11-09 06:56:39 +01:00
|
|
|
- powershell: Get-MpComputerStatus
|
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: $(node_version)
|
|
|
|
displayName: 'Install Node.js'
|
|
|
|
- task: Cache@2
|
|
|
|
inputs:
|
|
|
|
# use deterministic cache key that is specific
|
|
|
|
# to this test run
|
2020-11-09 07:43:24 +01:00
|
|
|
key: $(Build.SourceVersion)
|
2020-11-09 06:56:39 +01:00
|
|
|
path: $(System.DefaultWorkingDirectory)
|
|
|
|
displayName: Cache Build
|
|
|
|
- script: |
|
|
|
|
yarn install --frozen-lockfile --check-files
|
|
|
|
displayName: 'Install dependencies'
|
|
|
|
- script: |
|
2020-11-10 18:25:50 +01:00
|
|
|
node run-tests.js --timings --write-timings --azure -g 1/1
|
2020-11-09 06:56:39 +01:00
|
|
|
displayName: 'Fetch test timing data'
|
2020-11-10 18:25:50 +01:00
|
|
|
|
2020-11-09 06:56:39 +01:00
|
|
|
- stage: Test
|
|
|
|
dependsOn: Build
|
|
|
|
jobs:
|
2021-04-15 18:34:52 +02:00
|
|
|
- job: test_ie11
|
2020-11-09 06:56:39 +01:00
|
|
|
pool:
|
|
|
|
vmImage: 'windows-2019'
|
2021-07-29 17:35:13 +02:00
|
|
|
variables:
|
|
|
|
BROWSER_NAME: internet explorer
|
2020-11-09 06:56:39 +01:00
|
|
|
steps:
|
|
|
|
- checkout: none
|
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: $(node_version)
|
|
|
|
displayName: 'Install Node.js'
|
|
|
|
- task: Cache@2
|
|
|
|
inputs:
|
|
|
|
# use deterministic cache key that is specific
|
|
|
|
# to this test run
|
2020-11-09 07:43:24 +01:00
|
|
|
key: $(Build.SourceVersion)
|
2020-11-09 06:56:39 +01:00
|
|
|
path: $(System.DefaultWorkingDirectory)
|
|
|
|
displayName: Cache Build
|
2021-09-13 14:36:25 +02:00
|
|
|
|
|
|
|
- script: |
|
|
|
|
npm i -g selenium-standalone@6.18.0
|
|
|
|
displayName: 'Install selenium node'
|
|
|
|
|
2020-11-09 06:56:39 +01:00
|
|
|
- script: |
|
2021-07-29 17:35:13 +02:00
|
|
|
node run-tests.js -c 1 test/integration/production/test/index.test.js test/integration/css-client-nav/test/index.test.js test/integration/rewrites-has-condition/test/index.test.js
|
2020-11-09 06:56:39 +01:00
|
|
|
displayName: 'Run tests'
|
2020-11-10 18:25:50 +01:00
|
|
|
|
|
|
|
- job: test_unit
|
|
|
|
pool:
|
|
|
|
vmImage: 'windows-2019'
|
|
|
|
steps:
|
|
|
|
- checkout: none
|
|
|
|
- script: |
|
|
|
|
wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version /value
|
|
|
|
displayName: 'List Chrome version'
|
|
|
|
- task: NodeTool@0
|
|
|
|
inputs:
|
|
|
|
versionSpec: $(node_version)
|
|
|
|
displayName: 'Install Node.js'
|
|
|
|
- task: Cache@2
|
|
|
|
inputs:
|
|
|
|
# use deterministic cache key that is specific
|
|
|
|
# to this test run
|
|
|
|
key: $(Build.SourceVersion)
|
|
|
|
path: $(System.DefaultWorkingDirectory)
|
|
|
|
displayName: Cache Build
|
|
|
|
- script: |
|
2021-08-24 14:52:45 +02:00
|
|
|
node run-tests.js --type unit
|
2020-11-10 18:25:50 +01:00
|
|
|
displayName: 'Run tests'
|
2021-07-01 00:03:43 +02:00
|
|
|
# TODO: investigate re-enabling when stability matches running in
|
|
|
|
# tests in ubuntu environment
|
|
|
|
# - job: test_chrome_integration
|
|
|
|
# pool:
|
|
|
|
# vmImage: 'windows-2019'
|
|
|
|
# strategy:
|
|
|
|
# matrix:
|
|
|
|
# nodejs-1:
|
|
|
|
# group: 1/4
|
|
|
|
# nodejs-2:
|
|
|
|
# group: 2/4
|
|
|
|
# nodejs-3:
|
|
|
|
# group: 3/4
|
|
|
|
# nodejs-4:
|
|
|
|
# group: 4/4
|
|
|
|
# steps:
|
|
|
|
# - checkout: none
|
|
|
|
# - script: |
|
|
|
|
# wmic datafile where name="C:\\Program Files (x86)\\Google\\Chrome\\Application\\chrome.exe" get Version /value
|
|
|
|
# displayName: 'List Chrome version'
|
|
|
|
# - task: NodeTool@0
|
|
|
|
# inputs:
|
|
|
|
# versionSpec: $(node_version)
|
|
|
|
# displayName: 'Install Node.js'
|
|
|
|
# - task: Cache@2
|
|
|
|
# inputs:
|
|
|
|
# # use deterministic cache key that is specific
|
|
|
|
# # to this test run
|
|
|
|
# key: $(Build.SourceVersion)
|
|
|
|
# path: $(System.DefaultWorkingDirectory)
|
|
|
|
# displayName: Cache Build
|
|
|
|
# - script: |
|
|
|
|
# node run-tests.js -g $(group) --timings --azure
|
|
|
|
# displayName: 'Run tests'
|