Skip to content

Commit f0edf83

Browse files
authored
Merge pull request #682 from damccorm/master
Adding azure pipelines
2 parents 7db029d + bd6461b commit f0edf83

File tree

6 files changed

+110
-21
lines changed

6 files changed

+110
-21
lines changed

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Make sure baseline files have consistent line endings
2+
*.txt text eol=lf

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
node_modules
22
build/*.js
33
tests/*.js
4-
tests/generated/*
4+
tests/generated/*
5+
xunit.xml

azure-pipelines-template.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
steps:
2+
- task: NodeTool@0
3+
inputs:
4+
versionSpec: '$(node_version)'
5+
displayName: 'Install Node.js'
6+
7+
- task: UsePythonVersion@0
8+
inputs:
9+
versionSpec: '2.x'
10+
displayName: 'Use python 2'
11+
12+
- script: npm install
13+
displayName: 'npm install'
14+
15+
- script: npm run build
16+
displayName: 'Build'
17+
18+
- script: npm run test
19+
displayName: 'Test'
20+
21+
- task: PublishTestResults@2
22+
inputs:
23+
testResultsFiles: '**/xunit.xml'
24+
condition: succeededOrFailed()

azure-pipelines.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
trigger:
2+
- master
3+
- releases/*
4+
5+
jobs:
6+
7+
# All tasks on Linux
8+
- job: build_all_linux_legacy
9+
displayName: Build all tasks using node 8 (Linux)
10+
variables:
11+
node_version: '8.x'
12+
pool:
13+
vmImage: 'Ubuntu 16.04'
14+
steps:
15+
- template: azure-pipelines-template.yml
16+
17+
# All tasks on Windows
18+
- job: build_all_windows
19+
displayName: Build all tasks (Windows)
20+
variables:
21+
node_version: '11.x'
22+
pool:
23+
vmImage: vs2017-win2016
24+
steps:
25+
- template: azure-pipelines-template.yml
26+
27+
# All tasks on Linux
28+
- job: build_all_linux
29+
displayName: Build all tasks (Linux)
30+
variables:
31+
node_version: '11.x'
32+
pool:
33+
vmImage: 'Ubuntu 16.04'
34+
steps:
35+
- template: azure-pipelines-template.yml
36+
37+
# All tasks on macOS
38+
- job: build_all_darwin
39+
displayName: Build all tasks (macOS)
40+
variables:
41+
node_version: '11.x'
42+
pool:
43+
vmImage: macos-10.13
44+
steps:
45+
- template: azure-pipelines-template.yml

package-lock.json

Lines changed: 34 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"build:grammar": "tsc -b build -v && node build/build.js",
1010
"build:tests": "tsc -b tests -v",
1111
"pretest": "npm run build",
12-
"test": "mocha --full-trace tests/test.js",
12+
"test": "mocha --full-trace tests/test.js --reporter mocha-multi-reporters",
1313
"diff": "cross-env-shell $DIFF tests/baselines tests/generated",
1414
"accept": "cpx tests/generated/* tests/baselines"
1515
},
@@ -27,6 +27,7 @@
2727
},
2828
"devDependencies": {
2929
"cpx": "^1.5.0",
30-
"cross-env": "^5.1.1"
30+
"cross-env": "^5.1.1",
31+
"mocha-multi-reporters": "^1.1.7"
3132
}
3233
}

0 commit comments

Comments
 (0)