Skip to content

Commit

Permalink
- Added azure pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
iamvishnusankar committed Aug 2, 2020
1 parent 0ca2cd7 commit 308987e
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 0 deletions.
48 changes: 48 additions & 0 deletions azure-pipeline/npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: 1.0$(rev:.r)
trigger:
branches:
include:
- master
pr: none

pool:
name: Hosted Ubuntu 1604
demands: npm

steps:
# Authenticate
- task: npmAuthenticate@0
displayName: NPM Auth
inputs:
workingFile: .npmrc
customEndpoint: 'Vishnu Sankar'

# Build & Test
- bash: |
yarn install
yarn build:tsc
yarn build:ywc
yarn test
yarn set-version
displayName: Build & Test
# Test Result
- task: PublishTestResults@2
displayName: Publish Test Result
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: 'junit.xml'
failTaskOnFailedTests: true

# Coverage Result
- task: PublishCodeCoverageResults@1
displayName: Publish Coverage Result
inputs:
codeCoverageTool: 'Cobertura'
summaryFileLocation: 'coverage/cobertura-coverage.xml'
failIfCoverageEmpty: true

# Publish Packages
- bash: |
yarn ywc publish
displayName: Publish Packages
34 changes: 34 additions & 0 deletions azure-pipeline/pull-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: 1.0$(rev:.r)
trigger: none
pr:
branches:
include:
- master

pool:
name: Hosted Ubuntu 1604

steps:
# Install, Build & Test
- bash: |
yarn install
yarn build:tsc
yarn test
yarn set-version
displayName: Install, Build & Test
# Publish Test Results
- task: PublishTestResults@2
displayName: 'Publish Test Results junit.xml'
inputs:
testResultsFiles: junit.xml
failTaskOnFailedTests: true

# Publish code coverage
- task: PublishCodeCoverageResults@1
displayName: 'Publish code coverage from $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/coverage'
failIfCoverageEmpty: true

0 comments on commit 308987e

Please sign in to comment.