Skip to content

Commit

Permalink
Add basic CI pipeline (#12)
Browse files Browse the repository at this point in the history
* Add basic CI pipeline

* Add test and coverage reports
  • Loading branch information
sammacbeth committed Oct 14, 2019
1 parent dad9cad commit 6dba2a4
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
35 changes: 35 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
trigger:
- master

pool:
vmImage: 'ubuntu-latest'

steps:
- task: NodeTool@0
displayName: Node install
inputs:
versionSpec: '10.x'

- script: 'npm ci'
displayName: 'npm install'

- script: 'npm run bundle'
displayName: 'build and bundle'

- script: 'npm run ci-test'
displayName: 'test'

- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: '**/junit.xml'

- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '**/*coverage.xml'
reportDirectory: '**/coverage'

- script: 'npm run lint'
displayName: 'lint'
35 changes: 35 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"bundle": "rollup -c rollup.config.ts",
"prebundle": "npm run build",
"test": "jest --coverage --no-cache ./test/",
"ci-test": "jest --coverage --ci ./test/ --reporters=default --reporters=jest-junit --coverage-reporters=cobertura",
"pretest": "npm run build",
"benchmark": "make -C bench",
"prebenchmark": "npm run bundle"
Expand All @@ -31,6 +32,7 @@
"benchmark": "^2.1.4",
"chalk": "^2.4.2",
"jest": "^24.8.0",
"jest-junit": "^8.0.0",
"punycode": "^2.1.1",
"rollup": "^1.16.2",
"rollup-plugin-node-resolve": "^5.1.0",
Expand Down

0 comments on commit 6dba2a4

Please sign in to comment.