generated from hbenl/vscode-example-test-adapter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
azure-pipelines.yml
94 lines (83 loc) · 3.38 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
trigger:
branches:
include:
- master
tags:
include:
- v*
strategy:
matrix:
linux:
imageName: "ubuntu-latest"
linux-old-devtools:
imageName: "ubuntu-latest"
# mac:
# imageName: 'macos-latest'
windows:
imageName: "windows-latest"
pool:
vmImage: $(imageName)
steps:
- task: NodeTool@0
inputs:
versionSpec: "16.x"
displayName: "Install Node.js"
- task: CmdLine@2
inputs:
script: |
tzutil /s "GMT Standard Time"
displayName: "Set the timezone for Windows"
condition: eq(variables['Agent.OS'], 'Windows_NT')
- bash: |
sudo add-apt-repository ppa:cran/libgit2
sudo add-apt-repository ppa:c2d4u.team/c2d4u4.0+
sudo add-apt-repository ppa:marutter/rrutter
sudo add-apt-repository ppa:marutter/c2d4u
sudo apt-get update
sudo apt-get install libcurl4-gnutls-dev libssh2-1-dev libgit2-dev libxml2-dev
sudo apt-get install r-cran-devtools
sudo Rscript -e "install.packages('mockery',repos = 'http://cran.us.r-project.org')"
displayName: "Install devtools for Linux"
condition: eq(variables['Agent.JobName'], 'Job linux')
- bash: |
sudo add-apt-repository ppa:cran/libgit2
sudo add-apt-repository ppa:c2d4u.team/c2d4u4.0+
sudo add-apt-repository ppa:marutter/rrutter
sudo add-apt-repository ppa:marutter/c2d4u
sudo apt-get update
sudo apt-get install libcurl4-gnutls-dev libssh2-1-dev libgit2-dev libxml2-dev
sudo Rscript -e "install.packages('remotes', repos = 'http://cran.us.r-project.org')"
sudo Rscript -e "remotes::install_version('devtools', version='2.3.2')"
sudo Rscript -e "install.packages('mockery', repos = 'http://cran.us.r-project.org')"
displayName: "Install previous version of devtools for Linux"
condition: eq(variables['Agent.JobName'], 'Job linux-old-devtools')
- bash: |
Rscript -e "install.packages('devtools', repos = 'http://cran.us.r-project.org', type='binary');install.packages('mockery',repos = 'http://cran.us.r-project.org', type='binary')"
displayName: "Install devtools"
condition: eq(variables['Agent.OS'], 'Windows_NT')
- bash: |
Rscript -e "install.packages('devtools', repos = 'http://cran.us.r-project.org', type='mac.binary');install.packages('mockery',repos = 'http://cran.us.r-project.org', type='mac.binary')"
displayName: "Install devtools"
condition: eq(variables['Agent.OS'], 'Darwin')
- bash: |
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
echo ">>> Started xvfb"
displayName: Start xvfb
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- bash: |
echo ">>> Compile vscode-test"
npm install && npm run build
echo ">>> Show file directory"
ls
echo ">>> Run integration test"
npm test
displayName: Run Tests
env:
DISPLAY: ":99.0"
- bash: |
echo ">>> Publish"
npm run publish
displayName: Publish
condition: and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'), eq(variables['Agent.JobName'], 'Job linux'))
env:
VSCE_PAT: $(VSCE_PAT)