-
Notifications
You must be signed in to change notification settings - Fork 12
/
azure-pipelines.yml
97 lines (86 loc) · 2.47 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Azure Pipelines config
#
# For docs on building and pushing Docker images
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker
schedules:
- cron: "0 0 * * *"
displayName: Daily builds
branches:
include:
- master
always: true
jobs:
- job: test
strategy:
matrix:
linux_node_14:
node_version: 14.x
linux_node_12:
node_version: 12.x
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: Install Node.js $(node_version)
- script: npm install
displayName: Install dependencies
- script: npm run lint
displayName: Linting
- script: npm run test:cover -- --testTimeout=120000 --forceExit
displayName: Run tests
- script: bash <(curl -s https://codecov.io/bash)
condition: succeeded()
displayName: Upload coverage
- job: release
dependsOn: [test]
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
pool:
vmImage: ubuntu-latest
steps:
- task: NodeTool@0
inputs:
versionSpec: 14.x
displayName: 'Install Node.js'
- script: |
npm ci
npm run docs
npm run build
npm run images
npx semantic-release
env:
GIT_AUTHOR_NAME: Stencila CI Bot
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: Stencila CI Bot
GIT_COMMITTER_EMAIL: [email protected]
GITHUB_TOKEN: $(GITHUB_TOKEN)
NPM_TOKEN: $(NPM_TOKEN)
displayName: 'Release docs and package'
- job: images
dependsOn: [release]
condition: eq(variables['Build.SourceBranch'], 'refs/heads/master')
pool:
vmImage: ubuntu-latest
timeoutInMinutes: 0
steps:
- task: Docker@2
displayName: stencila/executa-all
inputs:
command: buildAndPush
dockerfile: images/executa-all/Dockerfile
containerRegistry: DockerHub
repository: stencila/executa-all
tags: |
$(Build.BuildNumber)
latest
- task: Docker@2
displayName: stencila/executa-midi
inputs:
command: buildAndPush
dockerfile: images/executa-midi/.Dockerfile
containerRegistry: DockerHub
repository: stencila/executa-midi
tags: |
$(Build.BuildNumber)
latest