Skip to content

Instantly share code, notes, and snippets.

@corradin
Created December 24, 2021 15:01
Show Gist options
  • Save corradin/8cd55c28ed031fe401796d7eff8b13e3 to your computer and use it in GitHub Desktop.
Save corradin/8cd55c28ed031fe401796d7eff8b13e3 to your computer and use it in GitHub Desktop.
trigger:
- main
pool:
vmImage: ubuntu-latest
variables:
npm_config_cache: $(Pipeline.Workspace)/.npm
steps:
- task: Cache@2
inputs:
key: 'package-lock.json'
path: $(npm_config_cache)
displayName: Cache NPM packages
- script: |
npm ci --cache $(npm_config_cache)
displayName: NPM Install Dependencies
- script: |
npm cache ls
npm cache verify
displayName: NPM Show cache
- script: npm run lint
displayName: Lint
- script: npm run test:ci
displayName: Unit Tests
- script: npm run build
displayName: Build
trigger:
- main
pool:
vmImage: ubuntu-latest
steps:
- script: |
npm ci
displayName: NPM Install Dependencies
- script: npm run lint
displayName: Lint
- script: npm run test:ci
displayName: Unit Tests
- script: npm run build
displayName: Build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment