-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
76 lines (68 loc) · 2.37 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
jobs:
- job: test
strategy:
matrix:
linux_node_14:
image_name: ubuntu-latest
node_version: 14.x
linux_node_12:
image_name: ubuntu-latest
node_version: 12.x
mac:
node_version: 14.x
image_name: macOS-latest
# Skip, tests currently failing
# https://dev.azure.com/stencila/stencila/_build/results?buildId=6840&view=logs&j=b17395f6-68a3-5682-0476-d3f6f1043109&t=0d6dcb53-0957-53aa-c18a-237166af945a
# windows:
# node_version: 14.x
# image_name: windows-latest
pool:
vmImage: $(image_name)
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: 'Install Node.js $(node_version)'
- script: npm install
displayName: Install dependencies
# Run linting on Linux only (unncessary to duplicate by OS)
- script: npm run lint
condition: eq(variables['agent.os'], 'Linux')
displayName: Run linting
# Run browser env test on Linux only (unncessary to duplicate by OS)
- script: npm run test:browser -- --testTimeout=120000 --forceExit
condition: eq(variables['agent.os'], 'Linux')
displayName: Run browser tests
- script: npm run test:cover -- --testTimeout=120000 --forceExit --ci
env:
CI: TRUE
displayName: Run Node tests
# Upload coverage on Linux (unncessary to duplicate by OS)
- script: bash <(curl -s https://codecov.io/bash)
condition: and(succeeded(), eq(variables['agent.os'], 'Linux'))
displayName: 'Upload coverage'
- script: npm run build
displayName: Build package
- 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 install
npm run build
npm run docs
npx semantic-release
env:
GIT_AUTHOR_NAME: Stencila CI Bot
GIT_AUTHOR_EMAIL: ci@stenci.la
GIT_COMMITTER_NAME: Stencila CI Bot
GIT_COMMITTER_EMAIL: ci@stenci.la
GITHUB_TOKEN: $(GITHUB_TOKEN)
NPM_TOKEN: $(NPM_TOKEN)
displayName: Release package