rsnext/azure-pipelines.yml
Tim Neutkens 73a6374de2
Move test/integration/production to test/production (#55981)
Moves `test/integration/production` to
`test/production/pages-dir/production` to leverage test isolation,
useful for when Turbopack runs for the test.

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->
2023-09-26 15:38:50 +02:00

186 lines
6.1 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
NEXT_TELEMETRY_DISABLED: '1'
node_16_version: ^16.14.0
stages:
- stage: Test
jobs:
- job: test_integration
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: corepack enable
condition: eq(variables['isDocsOnly'], 'No')
displayName: 'Enable Corepack'
- 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@1.35.1 install chromium
condition: eq(variables['isDocsOnly'], 'No')
- script: |
node run-tests.js -c 1 test/production/pages-dir/production/test/index.test.ts 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_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: corepack enable
condition: eq(variables['isDocsOnly'], 'No')
displayName: 'Enable Corepack'
- 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'
env:
NEXT_TEST_MODE: 'dev'
# - job: test_e2e_dev
# 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: corepack enable
# condition: eq(variables['isDocsOnly'], 'No')
# displayName: 'Enable Corepack'
# - 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@1.35.1 install chromium
# condition: eq(variables['isDocsOnly'], 'No')
# - script: |
# node run-tests.js -c 1 --debug test/e2e/app-dir/app/index.test.ts
# condition: eq(variables['isDocsOnly'], 'No')
# displayName: 'Run tests (E2E Development)'
# env:
# NEXT_TEST_MODE: 'dev'
# - job: test_e2e_prod
# 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: corepack enable
# condition: eq(variables['isDocsOnly'], 'No')
# displayName: 'Enable Corepack'
# - 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@1.35.1 install chromium
# condition: eq(variables['isDocsOnly'], 'No')
# - script: |
# node run-tests.js -c 1 --debug test/e2e/app-dir/app/index.test.ts
# condition: eq(variables['isDocsOnly'], 'No')
# displayName: 'Run tests (E2E Production)'
# env:
# NEXT_TEST_MODE: 'start'