Skip to content

Commit

Permalink
chore: add cache
Browse files Browse the repository at this point in the history
  • Loading branch information
cipchk committed Oct 27, 2023
1 parent 44cf118 commit 054ad70
Showing 1 changed file with 17 additions and 9 deletions.
26 changes: 17 additions & 9 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,23 @@ pool:
stages:
- stage: env
jobs:
- job: Nodes
- job: Nodes & Yarn
steps:
- task: NodeTool@0
inputs:
versionSpec: '18.10.0'
displayName: 'Install Node.js'
- task: Cache@2
displayName: Cache Yarn packages
inputs:
key: '"yarn" | "$(Agent.OS)" | yarn.lock'
restoreKeys: |
"yarn" | "$(Agent.OS)"
"yarn"
path: $(YARN_CACHE_FOLDER)

- stage: build
dependsOn: env
jobs:
- job: build
steps:
Expand All @@ -28,7 +37,7 @@ stages:
node --version
yarn --version
yarn config list
yarn install
yarn --frozen-lockfile
displayName: 'Install'
- task: Bash@3
env:
Expand Down Expand Up @@ -72,21 +81,21 @@ stages:
displayName: 'Checkout'
clean: true
fetchDepth: 1
- script: yarn install
- script: yarn --frozen-lockfile
displayName: 'Install modules'
- script: |
node ./scripts/azure/github-comment.js "[Preview Failed](https://dev.azure.com/ng-alain/delon/_build/results?buildId=$(Build.BuildId))"
displayName: 'Comment on github'
env:
ACCESS_REPO: $(ACCESS_REPO)
ACCESS_TOKEN: $(ACCESS_TOKEN)
dependsOn: env
- stage: test
dependsOn: env
jobs:
- job: packages
steps:
- script: yarn install
- script: yarn --frozen-lockfile
displayName: 'Install'
- script: |
yarn run test
Expand Down Expand Up @@ -114,16 +123,15 @@ stages:
testResultsFiles: '**/TESTS*.xml'
- job: cli
steps:
- script: yarn install
- script: yarn --frozen-lockfile
displayName: 'Install'
- script: yarn run test:cli
dependsOn: env

- stage: lint
dependsOn: env
jobs:
- job: packages
steps:
- script: yarn install
- script: yarn --frozen-lockfile
displayName: 'Install'
- script: yarn run lint
dependsOn: env

0 comments on commit 054ad70

Please sign in to comment.