-
Notifications
You must be signed in to change notification settings - Fork 4
/
azure-pipelines.yml
90 lines (77 loc) · 2.53 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
variables:
- name: PYTHON_VERSION
value: '3.9'
- name: NODE_VERSION
value: '14.x'
pool:
vmImage: ubuntu-20.04
jobs:
- job: test
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
displayName: Use Python $(PYTHON_VERSION)
- task: NodeTool@0
inputs:
versionSpec: $(NODE_VERSION)
displayName: Use Node.js $(NODE_VERSION)
- script: make lint
displayName: Run linting
- script: make cover
displayName: Run unit tests
- script: bash <(curl -s https://codecov.io/bash)
condition: succeeded()
displayName: Upload coverage
- script: make smoke
displayName: Run smoke tests
- job: release
dependsOn: [test]
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: $(PYTHON_VERSION)
displayName: Use Python $(PYTHON_VERSION)
- task: NodeTool@0
inputs:
versionSpec: $(NODE_VERSION)
displayName: Use Node.js $(NODE_VERSION)
- task: Docker@2
inputs:
command: login
containerRegistry: DockerHub
displayName: Login to container registry (for publishing Docker images)
- task: TwineAuthenticate@1
inputs:
pythonUploadServiceConnection: PyPI
displayName: Authenticate with Twine (for publishing Python client)
- script: |
npm install
make -C manager venv
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: Tag and release
- script: |
set -e
make -C manager create-devdb-sqlite static
make -C manager run &
make -C manager snaps
kill %1
mkdir -p pages/manager/snaps
mv manager/snaps/* pages/manager/snaps
npx gh-pages --repo https://$(GITHUB_TOKEN)@github.com/stencila/hub.git -f -d pages
env:
GIT_AUTHOR_NAME: Stencila CI Bot
GIT_AUTHOR_EMAIL: [email protected]
GIT_COMMITTER_NAME: Stencila CI Bot
GIT_COMMITTER_EMAIL: [email protected]
displayName: Publish docs
# Temporarily skipping this as often timing out / hanging when taking snaps
condition: false