Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding azure pipelines #682

Merged
merged 7 commits into from
Nov 29, 2018
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Make sure baseline files have consistent line endings
*.txt text eol=lf
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
build/*.js
tests/*.js
tests/generated/*
tests/generated/*
xunit.xml
19 changes: 19 additions & 0 deletions azure-pipelines-template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
steps:
- task: NodeTool@0
inputs:
versionSpec: '8.9'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be templated so we get a node 8 and a latest stable node build, like the Travis yaml specifies? We don't need to test every version on every platform; but checking both versions in addition to each platform would be nice (I'd check each platform on latest stable and 'nix only for node 8).

On a related note: are there any fast build options we can opt in to? Like Travis had a container opt in (sudo: false); from what I understand the new non-preview 'nix images aren't containerized builds anymore. Mostly just curious here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weswigham I updated so that it gives the latest version of 11, unfortunately I don't think the node tool installer can check for the latest major version though (it will automatically bump with minor versions now though). Also, it looks like Windows builds are failing on Node 11, npm install seems to fail, it works fine on node 8 though.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What python version does the windows 10 vm have installed? Becuase that error looks like a node-gyp python version error.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can the vm be provisioned with python 2 instead of python 3?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, good call. Updated accordingly and it is no longer failing.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@weswigham when you get a chance would you mind taking a look at this again? I think it should be good to go.

displayName: 'Install Node.js'

- script: npm install
displayName: 'npm install'

- script: npm run build
displayName: 'Build'

- script: npm run test
displayName: 'Test'

- task: PublishTestResults@2
inputs:
testResultsFiles: '**/xunit.xml'
condition: succeededOrFailed()
29 changes: 29 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
trigger:
- master
- releases/*

jobs:

# All tasks on Linux
- job: build_all_windows
displayName: Build all tasks (Windows)
pool:
vmImage: vs2017-win2016
steps:
- template: azure-pipelines-template.yml

# All tasks on Linux
- job: build_all_linux
displayName: Build all tasks (Linux)
pool:
vmImage: 'Ubuntu 16.04'
steps:
- template: azure-pipelines-template.yml

# All tasks on macOS
- job: build_all_darwin
displayName: Build all tasks (macOS)
pool:
vmImage: macos-10.13
steps:
- template: azure-pipelines-template.yml
52 changes: 34 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build:grammar": "tsc -b build -v && node build/build.js",
"build:tests": "tsc -b tests -v",
"pretest": "npm run build",
"test": "mocha --full-trace tests/test.js",
"test": "mocha --full-trace tests/test.js --reporter mocha-multi-reporters",
"diff": "cross-env-shell $DIFF tests/baselines tests/generated",
"accept": "cpx tests/generated/* tests/baselines"
},
Expand All @@ -27,6 +27,7 @@
},
"devDependencies": {
"cpx": "^1.5.0",
"cross-env": "^5.1.1"
"cross-env": "^5.1.1",
"mocha-multi-reporters": "^1.1.7"
}
}