-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
72 lines (61 loc) · 2.21 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
# Azure Pipelines config
#
# Uses a hack to enable use of sudo to install dependencies
# See https://github.com/microsoft/azure-pipelines-agent/issues/2043#issuecomment-687983301
jobs:
- job: test
strategy:
matrix:
linux_40:
r_version: '4.0.3'
linux_36:
r_version: '3.6.3'
pool:
vmImage: ubuntu-latest
container:
image: 'rocker/r-ver:$(r_version)'
options: "--name ci-container -v /usr/bin/docker:/tmp/docker:ro"
steps:
- script: |
/tmp/docker exec -t -u 0 ci-container \
sh -c "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" -y install sudo"
displayName: Install sudo
- script: |
sudo apt-get update
sudo apt-get install -y \
git \
libcurl4-openssl-dev \
libgit2-dev \
libssl-dev \
libxml2-dev \
nodejs \
npm \
pandoc \
zlib1g-dev
sudo Rscript -e "install.packages('remotes', repos = 'https://cloud.r-project.org')"
sudo Rscript -e "remotes::install_deps(dependencies = TRUE, force = TRUE)"
displayName: Install dependencies
- script: make lint
displayName: Run linting
- script: Rscript -e 'covr::codecov()'
condition: startsWith(variables['r_version'], '4')
displayName: Run tests and upload coverage
- script: make tests
condition: not(startsWith(variables['r_version'], '4'))
displayName: Run tests
- script: make check
displayName: Check package
- script: make docs
condition: and(succeeded(), startsWith(variables['r_version'], '4'))
displayName: Build docs
- script: |
npm install @stencila/semantic-release-config @semantic-release/exec
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)
condition: and(succeeded(), startsWith(variables['r_version'], '4'))
displayName: Release