Skip to content

Commit

Permalink
test: run ci on azure-pipelines (#292)
Browse files Browse the repository at this point in the history
  • Loading branch information
azure-pipelines[bot] authored and fengmk2 committed Sep 26, 2018
1 parent b760530 commit 5e80ee8
Show file tree
Hide file tree
Showing 5 changed files with 68 additions and 22 deletions.
4 changes: 1 addition & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![NPM version][npm-image]][npm-url]
[![build status][travis-image]][travis-url]
[![appveyor build status][appveyor-image]][appveyor-url]
[![Build Status](https://dev.azure.com/eggjs/egg/_apis/build/status/node-modules.urllib)](https://dev.azure.com/eggjs/egg/_build/latest?definitionId=7)
[![Test coverage][codecov-image]][codecov-url]
[![David deps][david-image]][david-url]
[![Known Vulnerabilities][snyk-image]][snyk-url]
Expand All @@ -12,8 +12,6 @@
[npm-url]: https://npmjs.org/package/urllib
[travis-image]: https://img.shields.io/travis/node-modules/urllib.svg?style=flat-square
[travis-url]: https://travis-ci.org/node-modules/urllib
[appveyor-image]: https://ci.appveyor.com/api/projects/status/wpnl7r1llxyruja9?svg=true
[appveyor-url]: https://ci.appveyor.com/project/eggjs/urllib-54ds2
[codecov-image]: https://codecov.io/gh/node-modules/urllib/branch/master/graph/badge.svg
[codecov-url]: https://codecov.io/gh/node-modules/urllib
[david-image]: https://img.shields.io/david/node-modules/urllib.svg?style=flat-square
Expand Down
17 changes: 0 additions & 17 deletions appveyor.yml

This file was deleted.

49 changes: 49 additions & 0 deletions azure-pipelines.template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# 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/parcel-bundler/parcel/blob/master/azure-pipelines-template.yml

jobs:
- job: ${{ parameters.name }}
pool:
vmImage: ${{ parameters.vmImage }}
strategy:
matrix:
node_6:
node_version: 6
node_8:
node_version: 8
node_10:
node_version: 10
maxParallel: 3
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: 'Install Node.js'

# Set ENV
- ${{ if ne(parameters.name, 'windows') }}:
- script: |
echo $PWD
export PATH="$PATH:$PWD/node_modules/.bin"
echo "##vso[task.setvariable variable=PATH]$PATH"
displayName: Set ENV
- ${{ if eq(parameters.name, 'windows') }}:
- script: |
echo %cd%
set PATH=%PATH%;%cd%\node_modules\.bin
echo "##vso[task.setvariable variable=PATH]%PATH%"
displayName: Set ENV
- script: |
npm i
displayName: 'Install Packages'
- script: |
npm run ci
displayName: 'Build & Unit Test'
- ${{ if ne(parameters.name, 'windows') }}:
- script: |
npm i codecov && codecov
displayName: 'Report Coverage'
16 changes: 16 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
jobs:
- template: azure-pipelines.template.yml
parameters:
name: linux
vmImage: 'ubuntu-16.04'

- template: azure-pipelines.template.yml
parameters:
name: windows
vmImage: 'vs2017-win2016'

- template: azure-pipelines.template.yml
parameters:
name: macos
vmImage: 'xcode9-macos10.13'

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,14 @@
"dependencies": {
"any-promise": "^1.3.0",
"content-type": "^1.0.2",
"debug": "^2.6.0",
"debug": "^2.6.9",
"default-user-agent": "^1.0.0",
"digest-header": "^0.0.1",
"ee-first": "~1.1.1",
"humanize-ms": "^1.2.0",
"iconv-lite": "^0.4.15",
"ip": "^1.1.5",
"proxy-agent": "^2.1.0",
"proxy-agent": "^2.3.1",
"pump": "^3.0.0",
"qs": "^6.4.0",
"statuses": "^1.3.1",
Expand Down

0 comments on commit 5e80ee8

Please sign in to comment.