diff --git a/README.md b/README.md index c35a373..fea7a90 100644 --- a/README.md +++ b/README.md @@ -243,7 +243,7 @@ req.on('error', function (err) { This software is licensed under the MIT License. Copyright (C) 2012 - 2014 fengmk2 -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 diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index d3108c3..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,17 +0,0 @@ -environment: - matrix: - - nodejs_version: '4' - - nodejs_version: '6' - - nodejs_version: '8' - - nodejs_version: '10' - -install: - - ps: Install-Product node $env:nodejs_version - - npm i npminstall && node_modules\.bin\npminstall - -test_script: - - node --version - - npm --version - - npm run test - -build: off diff --git a/azure-pipelines.template.yml b/azure-pipelines.template.yml new file mode 100644 index 0000000..4f10e47 --- /dev/null +++ b/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' diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000..07d8937 --- /dev/null +++ b/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' + diff --git a/package.json b/package.json index 899c59c..c0d946d 100644 --- a/package.json +++ b/package.json @@ -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", @@ -51,6 +51,7 @@ "node": ">=4.0.0" }, "ci": { + "type": "travis, azure-pipelines", "version": "4, 6, 8, 10" }, "author": "fengmk2 (http://fengmk2.com)",