mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
Test reports are not being published to Azure Pipelines (#5715)
This PR is related to the issue #5713 The PR helps to publish test results for reporting in Azure Pipelines. Azure Pipelines provides excellent reporting capabilities that can be leveraged by this PR. An example report is shown in the image below. ![image](https://user-images.githubusercontent.com/13175100/48767951-e8a73580-ecdd-11e8-8e6a-20d7767d7c1b.png)
This commit is contained in:
parent
9b2782a6d0
commit
d43d305092
|
@ -26,3 +26,15 @@ steps:
|
|||
- script: |
|
||||
yarn test
|
||||
displayName: 'Run tests'
|
||||
|
||||
- task: PublishTestResults@2
|
||||
displayName: 'Publish Test Results'
|
||||
inputs:
|
||||
testResultsFiles: '**junit*.xml'
|
||||
testRunTitle: TestRun ${{ parameters.name }} $(node_version)
|
||||
|
||||
- task: PublishCodeCoverageResults@1
|
||||
displayName: 'Publish code coverage results'
|
||||
inputs:
|
||||
codeCoverageTool: 'cobertura'
|
||||
summaryFileLocation: '**/coverage/cobertura-coverage.xml'
|
|
@ -8,5 +8,6 @@ module.exports = {
|
|||
rootDir: 'test',
|
||||
modulePaths: ['<rootDir>/lib'],
|
||||
globalSetup: '<rootDir>/jest-global-setup.js',
|
||||
globalTeardown: '<rootDir>/jest-global-teardown.js'
|
||||
globalTeardown: '<rootDir>/jest-global-teardown.js',
|
||||
coverageReporters: ['text', 'lcov', 'cobertura']
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
"bootstrap": "lerna bootstrap",
|
||||
"dev": "lerna run build --stream --parallel",
|
||||
"testonly": "jest",
|
||||
"testall": "npm run testonly -- --coverage --forceExit --runInBand",
|
||||
"testall": "npm run testonly -- --coverage --forceExit --runInBand --reporters=default --reporters=jest-junit",
|
||||
"pretest": "npm run lint",
|
||||
"test": "npm run testall || npm run testall",
|
||||
"coveralls": "cat ./test/coverage/lcov.info | coveralls",
|
||||
|
@ -52,6 +52,7 @@
|
|||
"fkill": "5.1.0",
|
||||
"flatten": "1.0.2",
|
||||
"get-port": "3.2.0",
|
||||
"jest-junit": "^5.0.0",
|
||||
"jest-cli": "23.6.0",
|
||||
"lerna": "^3.4.0",
|
||||
"lint-staged": "4.2.3",
|
||||
|
|
Loading…
Reference in a new issue