diff --git a/tools/pipelines/build-client.yml b/tools/pipelines/build-client.yml index 2e56677080d3..17acecc2c7cc 100644 --- a/tools/pipelines/build-client.yml +++ b/tools/pipelines/build-client.yml @@ -103,8 +103,6 @@ extends: - ci:test:stress:tinylicious - test:copyresults checks: - - policy-check - - layer-check - syncpack:deps - syncpack:versions - prettier diff --git a/tools/pipelines/repo-policy-check.yml b/tools/pipelines/repo-policy-check.yml index 5c220a499030..47e2592dcdb7 100644 --- a/tools/pipelines/repo-policy-check.yml +++ b/tools/pipelines/repo-policy-check.yml @@ -21,6 +21,8 @@ pool: variables: - name: skipComponentGovernanceDetection value: true +- name: pnpmStorePath + value: $(Pipeline.Workspace)/.pnpm-store steps: - task: UseNode@1 @@ -28,15 +30,30 @@ steps: inputs: version: 16.x +- task: Cache@2 + displayName: Cache pnpm store + inputs: + # Caches are already scoped to individual pipelines, so no need to include the release group name or tag + # in the cache key + key: 'pnpm-store | "$(Agent.OS)" | pnpm-lock.yaml' + path: ${{ variables.pnpmStorePath }} + restoreKeys: | + pnpm-store | "$(Agent.OS)" + - task: Bash@3 - displayName: Install root dependencies + displayName: Install and configure pnpm inputs: targetType: 'inline' - workingDirectory: . script: | - # Install pnpm globally npm i -g pnpm + pnpm config set store-dir $(pnpmStorePath) +- task: Bash@3 + displayName: Install root dependencies + inputs: + targetType: 'inline' + workingDirectory: . + script: | # We only want to install the root package deps, so we set recursive-install to false pnpm config set recursive-install false pnpm install --frozen-lockfile @@ -52,3 +69,16 @@ steps: inputs: command: 'custom' customCommand: 'run layer-check' + +- task: Npm@1 + displayName: npm run prettier:root + inputs: + command: 'custom' + customCommand: 'run prettier:root' + +- task: Bash@3 + displayName: Prune pnpm store + inputs: + targetType: 'inline' + script: | + pnpm store prune