Test using nvmrc in CI (#194836)
* Test using nvmrc in CI
* Force run yarn
* fix
* Bump nvmrc to latest
* Revert "Force run yarn"
This reverts commit af741f37d5
.
* Make all jobs use node from nvmrc
And install node-gyp where needed
pull/194857/head
parent
b96b558f64
commit
7d4027b62b
|
@ -31,7 +31,7 @@ jobs:
|
|||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
node-version-file: .nvmrc
|
||||
|
||||
- name: Compute node modules cache key
|
||||
id: nodeModulesCacheKey
|
||||
|
@ -83,7 +83,7 @@ jobs:
|
|||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
node-version-file: .nvmrc
|
||||
|
||||
- name: Compute node modules cache key
|
||||
id: nodeModulesCacheKey
|
||||
|
@ -145,7 +145,7 @@ jobs:
|
|||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
node-version-file: .nvmrc
|
||||
|
||||
- name: Compute node modules cache key
|
||||
id: nodeModulesCacheKey
|
||||
|
|
|
@ -25,7 +25,7 @@ jobs:
|
|||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
node-version-file: .nvmrc
|
||||
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
|
@ -115,7 +115,7 @@ jobs:
|
|||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
node-version-file: .nvmrc
|
||||
|
||||
- name: Compute node modules cache key
|
||||
id: nodeModulesCacheKey
|
||||
|
@ -186,7 +186,7 @@ jobs:
|
|||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
node-version-file: .nvmrc
|
||||
|
||||
- name: Compute node modules cache key
|
||||
id: nodeModulesCacheKey
|
||||
|
@ -258,7 +258,7 @@ jobs:
|
|||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
node-version-file: .nvmrc
|
||||
|
||||
- name: Compute node modules cache key
|
||||
id: nodeModulesCacheKey
|
||||
|
|
|
@ -22,7 +22,7 @@ jobs:
|
|||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18.15
|
||||
node-version-file: .nvmrc
|
||||
|
||||
- name: Compute node modules cache key
|
||||
id: nodeModulesCacheKey
|
||||
|
@ -53,7 +53,9 @@ jobs:
|
|||
env:
|
||||
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
||||
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
||||
run: yarn --frozen-lockfile --network-timeout 180000
|
||||
run: |
|
||||
npm i -g node-gyp@9.4.0
|
||||
yarn --frozen-lockfile --network-timeout 180000
|
||||
|
||||
- name: Download Playwright
|
||||
run: yarn playwright-install
|
||||
|
|
|
@ -23,7 +23,7 @@ jobs:
|
|||
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
node-version-file: .nvmrc
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.caching-stage.outputs.cache-hit != 'true'
|
||||
|
|
|
@ -11,7 +11,8 @@ parameters:
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
# Install yarn as the ARM64 build agent is using vanilla Ubuntu
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- template: ../distro/download-distro.yml
|
||||
|
||||
|
|
|
@ -14,7 +14,8 @@ parameters:
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../cli/cli-apply-patches.yml
|
||||
|
|
|
@ -7,7 +7,8 @@ parameters:
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- script: node build/setup-npm-registry.js $NPM_REGISTRY build
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- task: UseDotNet@2
|
||||
inputs:
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- template: ../distro/download-distro.yml
|
||||
|
||||
|
|
|
@ -18,7 +18,8 @@ steps:
|
|||
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../distro/download-distro.yml
|
||||
|
@ -77,7 +78,7 @@ steps:
|
|||
- script: |
|
||||
set -e
|
||||
export npm_config_arch=$(VSCODE_ARCH)
|
||||
npm i -g node-gyp
|
||||
npm i -g node-gyp@9.4.0
|
||||
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --frozen-lockfile --check-files && break
|
||||
|
|
|
@ -9,5 +9,6 @@ pr: none
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
- template: ./distro/download-distro.yml
|
||||
|
|
|
@ -17,7 +17,8 @@ parameters:
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../cli/cli-apply-patches.yml
|
||||
|
|
|
@ -20,7 +20,8 @@ steps:
|
|||
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../distro/download-distro.yml
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- task: DownloadPipelineArtifact@0
|
||||
displayName: "Download Pipeline Artifact"
|
||||
|
|
|
@ -5,7 +5,8 @@ steps:
|
|||
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- script: node build/setup-npm-registry.js $NPM_REGISTRY
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
|
|
|
@ -5,7 +5,8 @@ steps:
|
|||
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- powershell: node build/setup-npm-registry.js $env:NPM_REGISTRY
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
|
|
|
@ -5,7 +5,8 @@ parameters:
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15.x"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ./distro/download-distro.yml
|
||||
|
@ -58,6 +59,8 @@ steps:
|
|||
|
||||
- script: |
|
||||
set -e
|
||||
npm i -g node-gyp@9.4.0
|
||||
|
||||
for i in {1..5}; do # try 5 times
|
||||
yarn --frozen-lockfile --check-files && break
|
||||
if [ $i -eq 3 ]; then
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- task: AzureKeyVault@1
|
||||
displayName: "Azure Key Vault: Get Secrets"
|
||||
|
|
|
@ -5,7 +5,8 @@ parameters:
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- task: AzureCLI@2
|
||||
inputs:
|
||||
|
|
|
@ -12,7 +12,8 @@ pool:
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- bash: |
|
||||
TAG_VERSION=$(git describe --tags `git rev-list --tags --max-count=1`)
|
||||
|
|
|
@ -52,7 +52,8 @@ stages:
|
|||
outputFormat: "pre"
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- template: ./distro/download-distro.yml
|
||||
|
||||
|
@ -179,7 +180,8 @@ stages:
|
|||
toolMajorVersion: "V2"
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- template: ./distro/download-distro.yml
|
||||
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- template: ../distro/download-distro.yml
|
||||
|
||||
|
|
|
@ -17,7 +17,8 @@ parameters:
|
|||
steps:
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- ${{ if ne(parameters.VSCODE_QUALITY, 'oss') }}:
|
||||
- template: ../cli/cli-apply-patches.yml
|
||||
|
|
|
@ -10,7 +10,8 @@ steps:
|
|||
- task: NodeTool@0
|
||||
displayName: "Use Node.js"
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- powershell: node build/setup-npm-registry.js $env:NPM_REGISTRY build
|
||||
condition: and(succeeded(), ne(variables['NPM_REGISTRY'], 'none'))
|
||||
|
|
|
@ -20,7 +20,8 @@ steps:
|
|||
|
||||
- task: NodeTool@0
|
||||
inputs:
|
||||
versionSpec: "18.15"
|
||||
versionSource: fromFile
|
||||
versionFilePath: .nvmrc
|
||||
|
||||
- task: UsePythonVersion@0
|
||||
inputs:
|
||||
|
|
Loading…
Reference in New Issue