Skip to content

Commit

Permalink
ci: improve (webpack#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
evilebottnawi authored Nov 12, 2019
1 parent 7d90529 commit 3a4f74a
Showing 1 changed file with 36 additions and 19 deletions.
55 changes: 36 additions & 19 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@ trigger:
- master
- next

variables:
npm_config_cache: $(Pipeline.Workspace)/.npm

jobs:
- job: Lint
pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
Expand All @@ -20,10 +23,12 @@ jobs:
node -v
npm -v
displayName: 'Print versions'
- task: Npm@1
- task: CacheBeta@0
inputs:
command: custom
customCommand: ci
key: npm | $(Agent.OS) | package-lock.json
path: $(npm_config_cache)
displayName: 'Cache npm'
- script: npm ci
displayName: 'Install dependencies'
- script: npm run lint
displayName: 'Run lint'
Expand All @@ -41,10 +46,12 @@ jobs:

- job: Linux
pool:
vmImage: ubuntu-16.04
vmImage: ubuntu-latest
strategy:
maxParallel: 3
maxParallel: 4
matrix:
node-13:
node_version: ^13.0.0
node-12:
node_version: ^12.0.0
node-10:
Expand All @@ -65,10 +72,12 @@ jobs:
node -v
npm -v
displayName: 'Print versions'
- task: Npm@1
- task: CacheBeta@0
inputs:
command: custom
customCommand: ci
key: npm | $(Agent.OS) | package-lock.json
path: $(npm_config_cache)
displayName: 'Cache npm'
- script: npm ci
displayName: 'Install dependencies'
- script: npm run test:coverage -- --ci --reporters="default" --reporters="jest-junit"
displayName: 'Run tests with coverage'
Expand All @@ -84,10 +93,12 @@ jobs:

- job: macOS
pool:
vmImage: macOS-10.14
vmImage: macOS-latest
strategy:
maxParallel: 3
maxParallel: 4
matrix:
node-13:
node_version: ^13.0.0
node-12:
node_version: ^12.0.0
node-10:
Expand All @@ -108,10 +119,12 @@ jobs:
node -v
npm -v
displayName: 'Print versions'
- task: Npm@1
- task: CacheBeta@0
inputs:
command: custom
customCommand: ci
key: npm | $(Agent.OS) | package-lock.json
path: $(npm_config_cache)
displayName: 'Cache npm'
- script: npm ci
displayName: 'Install dependencies'
- script: npm run test:coverage -- --ci --reporters="default" --reporters="jest-junit"
displayName: 'Run tests with coverage'
Expand All @@ -127,10 +140,12 @@ jobs:

- job: Windows
pool:
vmImage: windows-2019
vmImage: windows-latest
strategy:
maxParallel: 3
maxParallel: 4
matrix:
node-13:
node_version: ^13.0.0
node-12:
node_version: ^12.0.0
node-10:
Expand All @@ -154,10 +169,12 @@ jobs:
node -v
npm -v
displayName: 'Print versions'
- task: Npm@1
- task: CacheBeta@0
inputs:
command: custom
customCommand: ci
key: npm | $(Agent.OS) | package-lock.json
path: $(npm_config_cache)
displayName: 'Cache npm'
- script: npm ci
displayName: 'Install dependencies'
- script: npm run test:coverage -- --ci --reporters="default" --reporters="jest-junit"
displayName: 'Run tests with coverage'
Expand Down

0 comments on commit 3a4f74a

Please sign in to comment.