Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polish pipeline config and add coverage reporting #2525

Merged
merged 5 commits into from
Oct 31, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules/
lib/
out/
out-test/
.nyc_output/
Makefile.gyp
*.Makefile
*.target.gyp.mk
Expand Down
4 changes: 4 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,7 @@ By contributing code to xterm.js you:
holder has explicitly granted the right to use it like this,
through a compatible open source license or through a direct
agreement with you.)

### Test coverage

One area that always needs attention is improving out unit test coverage, you can view the code coverage report on [Azure Pipelines](https://dev.azure.com/xtermjs/xterm.js/_build/latest?definitionId=3) by clicking the Code Coverage tab.
67 changes: 35 additions & 32 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,32 @@ jobs:
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
- task: YarnInstaller@3
inputs:
versionSpec: "1.9.4"
versionSpec: '1.x'
displayName: 'Install Yarn'
- script: |
yarn
- script: yarn
displayName: 'Install dependencies and build'
- script: |
yarn test-unit --forbid-only
- script: yarn test-unit --forbid-only
displayName: 'Unit tests'
- script: |
yarn lint
- script: yarn lint
displayName: 'Lint'
- script: |
NODE_PATH=$(pwd)/out ./node_modules/.bin/nyc ./node_modules/.bin/mocha './out/*test.js' './out/**/*test.js'
./node_modules/.bin/nyc report --reporter=cobertura
displayName: 'Coverage report'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/*coverage.xml'
displayName: 'Publish coverage'
- task: mspremier.BuildQualityChecks.QualityChecks-task.BuildQualityChecks@6
displayName: 'Check build quality'
inputs:
checkCoverage: true
coverageType: branches
coverageThreshold: 55
coverageFailOption: fixed

- job: macOS
pool:
Expand All @@ -34,14 +47,11 @@ jobs:
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'
- script: |
yarn
- script: yarn
displayName: 'Install dependencies and build'
- script: |
yarn test-unit --forbid-only
- script: yarn test-unit --forbid-only
displayName: 'Unit tests'
- script: |
yarn lint
- script: yarn lint
displayName: 'Lint'

- job: Windows
Expand All @@ -52,14 +62,11 @@ jobs:
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'
- script: |
yarn
- script: yarn
displayName: 'Install dependencies and build'
- script: |
yarn test-unit --forbid-only
- script: yarn test-unit --forbid-only
displayName: 'Unit tests'
- script: |
yarn lint
- script: yarn lint
displayName: 'Lint'

- job: Linux_IntegrationTests
Expand All @@ -70,12 +77,11 @@ jobs:
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
- task: YarnInstaller@3
inputs:
versionSpec: "1.9.4"
versionSpec: '1.x'
displayName: 'Install Yarn'
- script: |
yarn
- script: yarn
displayName: 'Install dependencies and build'
- script: |
yarn start &
Expand All @@ -91,8 +97,7 @@ jobs:
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'
- script: |
yarn
- script: yarn
displayName: 'Install dependencies and build'
- script: |
yarn start &
Expand All @@ -115,13 +120,11 @@ jobs:
inputs:
versionSpec: '8.x'
displayName: 'Install Node.js'
- task: geeklearningio.gl-vsts-tasks-yarn.yarn-installer-task.YarnInstaller@2
- task: YarnInstaller@3
inputs:
versionSpec: "1.9.4"
versionSpec: '1.x'
displayName: 'Install Yarn'
- script: |
yarn
- script: yarn
displayName: 'Install dependencies and build'
- script: |
NPM_AUTH_TOKEN="$(NPM_AUTH_TOKEN)" node ./bin/publish.js
- script: NPM_AUTH_TOKEN="$(NPM_AUTH_TOKEN)" node ./bin/publish.js
displayName: 'Package and publish to npm'
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
"jsdom": "^11.11.0",
"mocha": "^6.1.4",
"node-pty": "0.7.6",
"nyc": "13",
"puppeteer": "^1.15.0",
"source-map-loader": "^0.2.4",
"ts-loader": "^6.0.4",
Expand Down
Loading