rsnext/azure-pipelines.yml
Jiachi Liu 6aae39c759
Fix app client entry key for windows (#44011)
## Bug

The app client entry key was in win32 slashes like `app\blog`, and when
we add the new layer checking logic in #43197, `name.startsWith('app/')`
doesn't work.

Fixes #43854
Fixes #43902

<img width="862" alt="image"
src="https://user-images.githubusercontent.com/4800338/207641886-08ffc159-0516-4609-9a1f-8c8693586122.png">


- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have a helpful link attached, see
[`contributing.md`](https://github.com/vercel/next.js/blob/canary/contributing.md)
2022-12-14 19:52:52 +01:00

144 lines
4.5 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`, `main`, or release tags. This unnecessarily
# increases the backlog, and the change was already tested on the PR.
branches:
include:
- '*'
exclude:
- canary
- main
- refs/tags/*
pr:
# Do not run Azure CI for docs-only/example-only changes:
paths:
include:
- '*'
exclude:
- bench
- docs
- errors
- examples
variables:
PNPM_CACHE_FOLDER: $(Pipeline.Workspace)/.pnpm-store
PNPM_VERSION: 7.3.0
NEXT_TELEMETRY_DISABLED: '1'
node_14_version: ^14.19.0
node_16_version: ^16.8.0
stages:
- stage: Test
jobs:
- job: test_integration
pool:
vmImage: 'windows-2019'
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_14_version)
displayName: 'Install Node.js'
- bash: |
node scripts/run-for-change.js --not --type docs --exec echo "##vso[task.setvariable variable=isDocsOnly]No"
displayName: 'Check Docs Only Change'
- script: npm i -g pnpm@$(PNPM_VERSION)
condition: eq(variables['isDocsOnly'], 'No')
- script: pnpm config set store-dir $(PNPM_CACHE_FOLDER)
condition: eq(variables['isDocsOnly'], 'No')
- script: pnpm store path
condition: eq(variables['isDocsOnly'], 'No')
- script: pnpm install && pnpm run build
condition: eq(variables['isDocsOnly'], 'No')
displayName: 'Install and build'
- script: npx playwright install chromium
condition: eq(variables['isDocsOnly'], 'No')
- 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
condition: eq(variables['isDocsOnly'], 'No')
displayName: 'Run tests'
- job: test_unit
pool:
vmImage: 'windows-2019'
steps:
- 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_14_version)
displayName: 'Install Node.js'
- bash: |
node scripts/run-for-change.js --not --type docs --exec echo "##vso[task.setvariable variable=isDocsOnly]No"
displayName: 'Check Docs Only Change'
- script: npm i -g pnpm@$(PNPM_VERSION)
condition: eq(variables['isDocsOnly'], 'No')
- script: pnpm config set store-dir $(PNPM_CACHE_FOLDER)
condition: eq(variables['isDocsOnly'], 'No')
- script: pnpm store path
condition: eq(variables['isDocsOnly'], 'No')
- script: pnpm install && pnpm run build
condition: eq(variables['isDocsOnly'], 'No')
displayName: 'Install and build'
- script: node run-tests.js --type unit
condition: eq(variables['isDocsOnly'], 'No')
displayName: 'Run tests'
- job: test_integration_app_dir
pool:
vmImage: 'windows-2019'
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_16_version)
displayName: 'Install Node.js'
- bash: |
node scripts/run-for-change.js --not --type docs --exec echo "##vso[task.setvariable variable=isDocsOnly]No"
displayName: 'Check Docs Only Change'
- script: npm i -g pnpm@$(PNPM_VERSION)
condition: eq(variables['isDocsOnly'], 'No')
- script: pnpm config set store-dir $(PNPM_CACHE_FOLDER)
condition: eq(variables['isDocsOnly'], 'No')
- script: pnpm store path
condition: eq(variables['isDocsOnly'], 'No')
- script: pnpm install && pnpm run build
condition: eq(variables['isDocsOnly'], 'No')
displayName: 'Install and build'
- script: npx playwright install chromium
condition: eq(variables['isDocsOnly'], 'No')
- script: |
node run-tests.js -c 1 test/integration/app-dir-basic/test/index.test.js
condition: eq(variables['isDocsOnly'], 'No')
displayName: 'Run tests'