Skip to content

Commit

Permalink
test: run test on macos on azure-pipelines (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Sep 20, 2018
1 parent 5146e82 commit 2cb2baf
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -243,7 +243,7 @@ req.on('error', function (err) {
This software is licensed under the MIT License.

Copyright (C) 2012 - 2014 fengmk2 <fengmk2@gmail.com>
Copyright (C) 2015 - 2016 node-modules
Copyright (C) 2015 - present node-modules

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 0 additions & 17 deletions appveyor.yml

This file was deleted.

22 changes: 22 additions & 0 deletions azure-pipelines.template.yml
@@ -0,0 +1,22 @@
# Node.js
# Build a general Node.js application with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/vsts/pipelines/languages/javascript
# demo: https://github.com/ryanelian/instapack/blob/master/azure-pipelines.template.yml

jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
steps:
- task: NodeTool@0
inputs:
versionSpec: ${{ parameters.node_version }}
displayName: 'Install Node.js'

- script: |
${{ parameters.install_script }}
displayName: 'Install Packages'
- script: |
${{ parameters.test_script }}
displayName: 'Build & Unit Test'
65 changes: 65 additions & 0 deletions azure-pipelines.yml
@@ -0,0 +1,65 @@
jobs:
- template: azure-pipelines.template.yml
parameters:
name: win_node_4
vmImage: 'vs2017-win2016'
node_version: 4
install_script: 'npm i -g npminstall && npminstall'
test_script: 'npm run ci'

- template: azure-pipelines.template.yml
parameters:
name: win_node_6
vmImage: 'vs2017-win2016'
node_version: 6
install_script: 'npm i -g npminstall && npminstall'
test_script: 'npm run ci'

- template: azure-pipelines.template.yml
parameters:
name: win_node_8
vmImage: 'vs2017-win2016'
node_version: 8
install_script: 'npm i -g npminstall && npminstall'
test_script: 'npm run ci'

- template: azure-pipelines.template.yml
parameters:
name: win_node_10
vmImage: 'vs2017-win2016'
node_version: 10
install_script: 'npm i -g npminstall && npminstall'
test_script: 'npm run ci'

- template: azure-pipelines.template.yml
parameters:
name: macos_node_4
vmImage: 'xcode9-macos10.13'
node_version: 4
install_script: 'npm i -g npminstall && npminstall'
test_script: 'npm run ci'

- template: azure-pipelines.template.yml
parameters:
name: macos_node_6
vmImage: 'xcode9-macos10.13'
node_version: 6
install_script: 'npm i -g npminstall && npminstall'
test_script: 'npm run ci'

- template: azure-pipelines.template.yml
parameters:
name: macos_node_8
vmImage: 'xcode9-macos10.13'
node_version: 8
install_script: 'npm i -g npminstall && npminstall'
test_script: 'npm run ci'

- template: azure-pipelines.template.yml
parameters:
name: macos_node_10
vmImage: 'xcode9-macos10.13'
node_version: 10
install_script: 'npm i -g npminstall && npminstall'
test_script: 'npm run ci'

3 changes: 2 additions & 1 deletion package.json
Expand Up @@ -25,7 +25,7 @@
"chunkstream": "^0.0.1",
"co": "^4.6.0",
"egg-bin": "^1.10.3",
"egg-ci": "^1.6.0",
"egg-ci": "^1.9.1",
"enable": "^3.3.0",
"eslint": "^3.18.0",
"eslint-config-egg": "^3.2.0",
Expand All @@ -51,6 +51,7 @@
"node": ">=4.0.0"
},
"ci": {
"type": "travis, azure-pipelines",
"version": "4, 6, 8, 10"
},
"author": "fengmk2 <fengmk2@gmail.com> (http://fengmk2.com)",
Expand Down

0 comments on commit 2cb2baf

Please sign in to comment.