From 03fbca0e36a2b915b5d884ad44b61051cf28efe4 Mon Sep 17 00:00:00 2001 From: yazninja <71800112+yazninja@users.noreply.github.com> Date: Wed, 10 May 2023 18:07:43 +0300 Subject: [PATCH] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index aaf539c3..02b50cd3 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -31,18 +31,17 @@ jobs: versionSource: "fromFile" versionFilePath: ".nvmrc" - # - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: - # - task: Cache@2 - # inputs: - # key: 'yarn | "$(Agent.OS)" | yarn.lock' - # path: $(YARN_CONFIG_CACHE) - # displayName: Cache yarn - + - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: + - task: Cache@2 + inputs: + key: 'yarn | "$(Agent.OS)" | yarn.lock' + path: $(YARN_CACHE_FOLDER) + displayName: Cache yarn + - script: | - yarn config -v - yarn config unset configCache - displayName: "Setup yarn v3" - + yarn set version from sources + displayName: "Setup yarn" + # Install dependencies (immutable for non-PR builds) - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: - script: yarn install --immutable-cache @@ -86,15 +85,14 @@ jobs: versionSource: "fromFile" versionFilePath: ".nvmrc" - # - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: - # - task: Cache@2 - # inputs: - # key: 'yarn | "$(Agent.OS)" | yarn.lock' - # path: $(YARN_CONFIG_CACHE) - # displayName: Cache yarn + - ${{ if ne(variables['Build.Reason'], 'PullRequest') }}: + - task: Cache@2 + inputs: + key: 'yarn | "$(Agent.OS)" | yarn.lock' + path: $(YARN_CACHE_FOLDER) + displayName: Cache yarn - script: | - yarn config unset configCache yarn set version from sources displayName: "Setup yarn"