Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cach2 instead of lighthouse #11

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 17 additions & 13 deletions script/vsts/platforms/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,16 @@ jobs:
keyfile: 'package.json, script/vsts/platforms/macos.yml, **/package-lock.json, !**/node_modules/**/package-lock.json, !**/.*/**/package-lock.json'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
vstsFeed: 'bae1bc26-220d-43c7-a955-4de039370de2'


- task: Cache@2
inputs:
key: 'Bootstrapped | "$(Agent.OS)" | package-lock.json'
restoreKeys: |
Bootstrapped | "$(Agent.OS)"
path: "."
cacheHitVar: CacheRestored
displayName: Cache Bootstrapped repository

- script: script/bootstrap
displayName: Bootstrap build environment
env:
Expand All @@ -36,13 +45,6 @@ jobs:
npm_config_build_from_source: true
condition: ne(variables['CacheRestored'], 'true')

- task: 1ESLighthouseEng.PipelineArtifactCaching.SaveCacheV1.SaveCache@1
displayName: Save node_modules cache
inputs:
keyfile: 'package.json, script/vsts/platforms/macos.yml, **/package-lock.json, !**/node_modules/**/package-lock.json, !**/.*/**/package-lock.json'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
vstsFeed: 'bae1bc26-220d-43c7-a955-4de039370de2'

- script: script/lint
displayName: Run linter

Expand Down Expand Up @@ -121,12 +123,14 @@ jobs:
- script: npm install --global [email protected]
displayName: Update npm

- task: 1ESLighthouseEng.PipelineArtifactCaching.RestoreCacheV1.RestoreCache@1
displayName: Restore node_modules cache
- task: Cache@2
inputs:
keyfile: 'package.json, script/vsts/platforms/macos.yml, **/package-lock.json, !**/node_modules/**/package-lock.json, !**/.*/**/package-lock.json'
targetfolder: '**/node_modules, !**/node_modules/**/node_modules'
vstsFeed: 'bae1bc26-220d-43c7-a955-4de039370de2'
key: 'Bootstrapped | "$(Agent.OS)" | package-lock.json'
restoreKeys: |
Bootstrapped | "$(Agent.OS)"
path: "."
condition: ne(variables['CacheRestored'], 'true')

# The artifact caching task does not work on forks, so we need to
# bootstrap again for pull requests coming from forked repositories.
Expand Down