From 90fdd02e591de4a97638e62fc88756068c134ead Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B8=85?= Date: Wed, 30 Jan 2019 20:00:14 +0800 Subject: [PATCH] Set up CI with Azure Pipelines (#14617) * Set up CI with Azure Pipelines * optimize text display * fix error name * add artifact for package-lock.json --- README.md | 1 + azure-pipelines.yml | 68 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 69 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/README.md b/README.md index accce8a610..b8c31e8a6d 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,7 @@ An enterprise-class UI design language and React implementation. +[![Build Status](https://dev.azure.com/ant-design/ant-design/_apis/build/status/ant-design.ant-design?branchName=master)](https://dev.azure.com/ant-design/ant-design/_build/latest?definitionId=2?branchName=master) [![CircleCI branch](https://img.shields.io/circleci/project/github/ant-design/ant-design/master.svg?style=flat-square)](https://circleci.com/gh/ant-design/ant-design) [![Codecov](https://img.shields.io/codecov/c/github/ant-design/ant-design/master.svg?style=flat-square)](https://codecov.io/gh/ant-design/ant-design/branch/master) [![npm package](https://img.shields.io/npm/v/antd.svg?style=flat-square)](https://www.npmjs.org/package/antd) diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..8ca97935f6 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,68 @@ +# Node.js +# Build a general Node.js project with npm. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript +name: ant design + +trigger: + - master + +resources: + repositories: + - repository: self + fetchDepth: 1 + +jobs: + - job: test_ + pool: + vmImage: 'Ubuntu-16.04' + strategy: + matrix: + TEST_TYPE: + TEST_TYPE: lint + dist-react@16: + REACT: 16 + TEST_TYPE: test:dist + lib-react@16: + REACT: 16 + TEST_TYPE: test:lib + es-react@16: + REACT: 16 + TEST_TYPE: test:es + dom-react@16: + REACT: 16 + TEST_TYPE: test:dom + node-react@16: + REACT: 16 + TEST_TYPE: test:node + dist-react@15: + REACT: 15 + TEST_TYPE: test:dist + lib-react@15: + REACT: 15 + TEST_TYPE: test:lib + es-react@15: + REACT: 15 + TEST_TYPE: test:es + dom-react@15: + REACT: 15 + TEST_TYPE: test:dom + node-react@15: + REACT: 15 + TEST_TYPE: test:node + steps: + - task: NodeTool@0 + inputs: + versionSpec: '11.x' + - script: npm install + displayName: install + - script: scripts/install-react.sh + displayName: install-react + - script: scripts/travis-script.sh + displayName: test + - task: PublishBuildArtifacts@1 + # 主分支,并且运行成功 + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) + inputs: + pathtoPublish: './package-lock.json' + artifactName: lock