fdb2cc80b1
Older versions of Node.js don't have a stable ESM implementation https://nodejs.org/api/esm.html#esm_modules_ecmascript_modules
154 lines
4.8 KiB
YAML
154 lines
4.8 KiB
YAML
trigger:
|
|
# Only run latest commit for branches:
|
|
batch: true
|
|
# Do not run Azure CI for docs-only/example-only changes:
|
|
paths:
|
|
include:
|
|
- '*'
|
|
exclude:
|
|
- bench
|
|
- docs
|
|
- errors
|
|
- examples
|
|
# 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/*
|
|
|
|
pr:
|
|
# Do not run Azure CI for docs-only/example-only changes:
|
|
paths:
|
|
include:
|
|
- '*'
|
|
exclude:
|
|
- bench
|
|
- docs
|
|
- errors
|
|
- examples
|
|
|
|
variables:
|
|
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
|
|
NEXT_TELEMETRY_DISABLED: '1'
|
|
node_version: ^12.22.0
|
|
|
|
stages:
|
|
- stage: Build
|
|
jobs:
|
|
- job: build
|
|
pool:
|
|
vmImage: 'windows-2019'
|
|
steps:
|
|
- script: echo $(Agent.BuildDirectory)
|
|
- script: dir
|
|
- script: dir $(System.DefaultWorkingDirectory)
|
|
- script: echo $(Build.SourceVersion)
|
|
- 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
|
|
key: $(Build.SourceVersion)
|
|
path: $(System.DefaultWorkingDirectory)
|
|
displayName: Cache Build
|
|
- script: |
|
|
yarn install --frozen-lockfile --check-files
|
|
displayName: 'Install dependencies'
|
|
- script: |
|
|
node run-tests.js --timings --write-timings --azure -g 1/1
|
|
displayName: 'Fetch test timing data'
|
|
|
|
- stage: Test
|
|
dependsOn: Build
|
|
jobs:
|
|
- job: test_ie11
|
|
pool:
|
|
vmImage: 'windows-2019'
|
|
variables:
|
|
BROWSER_NAME: internet explorer
|
|
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
|
|
key: $(Build.SourceVersion)
|
|
path: $(System.DefaultWorkingDirectory)
|
|
displayName: Cache Build
|
|
|
|
- script: |
|
|
npm i -g selenium-standalone@6.18.0
|
|
displayName: 'Install selenium node'
|
|
|
|
- script: |
|
|
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
|
|
displayName: 'Run tests'
|
|
|
|
- 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: |
|
|
node run-tests.js --type unit
|
|
displayName: 'Run tests'
|
|
# 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'
|