* Set up CI with Azure Pipelines

* Setting up CI with Azure Pipelines

* Added Azure Pipelines status badge
This commit is contained in:
apawast 2019-03-15 21:26:02 -04:00 коммит произвёл Josh Goldberg
Родитель fbdc415878
Коммит fc41f7cc64
3 изменённых файлов: 82 добавлений и 1 удалений

Просмотреть файл

@ -0,0 +1,26 @@
#
# Steps for building and testing tslint-microsoft-contrib. See jobs defined in .azure-pipelines.yml.
#
steps:
# Clones the repo. This is an explicit step to preserve symlinks for Windows.
- checkout: self
- task: NodeTool@0
inputs:
versionSpec: $(NODE_VERSION)
checkLatest: 'true'
displayName: 'Install Node.js'
# Run npm ci by default unless NPM_INSTALL is set
- script: npm ci
displayName: 'Install dependencies'
condition: not(variables.NPM_INSTALL)
# Otherwise, run npm install if NPM_INSTALL is set (typically for Node versions < 10.x)
- script: npm install
displayName: 'Install dependencies (npm install)'
condition: variables.NPM_INSTALL
- script: npm run test
displayName: 'Run tests'

54
.azure-pipelines.yml Normal file
Просмотреть файл

@ -0,0 +1,54 @@
trigger:
- master
- azure-pipelines
jobs:
- job: Linux
pool:
vmImage: 'ubuntu-16.04'
strategy:
matrix:
Node6:
NODE_VERSION: '6.x'
NPM_INSTALL: true
TEST_TITLE: 'Linux node 6'
Node8:
NODE_VERSION: '8.x'
NPM_INSTALL: true
TEST_TITLE: 'Linux node 8'
Node10:
NODE_VERSION: '10.x'
TEST_TITLE: 'Linux node 10'
Node11:
NODE_VERSION: '11.x'
TEST_TITLE: 'Linux node 11'
steps:
- template: .azure-pipelines-steps.yml
- job: Windows
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
Node6:
NODE_VERSION: '6.x'
NPM_INSTALL: true
TEST_TITLE: 'Windows node 6'
Node8:
NODE_VERSION: '8.x'
NPM_INSTALL: true
TEST_TITLE: 'Windows node 8'
Node10:
NODE_VERSION: '10.x'
TEST_TITLE: 'Windows node 10'
Node11:
NODE_VERSION: '11.x'
TEST_TITLE: 'Windows node 11'
steps:
- template: .azure-pipelines-steps.yml
variables:
# Used by chalk. Ensures output from Jest includes ANSI escape characters that are needed to match test snapshots.
FORCE_COLOR: 1

Просмотреть файл

@ -2,7 +2,8 @@
[![npm version](https://badge.fury.io/js/tslint-microsoft-contrib.svg)](https://badge.fury.io/js/tslint-microsoft-contrib)
[![Downloads](https://img.shields.io/npm/dm/tslint-microsoft-contrib.svg)](https://npmjs.org/package/tslint-microsoft-contrib)
[![Build Status](https://travis-ci.org/Microsoft/tslint-microsoft-contrib.svg?branch=master)](https://travis-ci.org/Microsoft/tslint-microsoft-contrib)
[![TravisCI Build Status](https://travis-ci.org/Microsoft/tslint-microsoft-contrib.svg?branch=master)](https://travis-ci.org/Microsoft/tslint-microsoft-contrib)
[![Azure Pipelines Build Status](https://dev.azure.com/ms/tslint-microsoft-contrib/_apis/build/status/tslint-microsoft-contrib?branchName=master)](https://dev.azure.com/ms/tslint-microsoft-contrib/_build/latest?definitionId=68&branchName=master)
[![Join the chat at https://gitter.im/Microsoft/tslint-microsoft-contrib](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/Microsoft/tslint-microsoft-contrib?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)