diff --git a/.istanbul.yml b/.istanbul.yml new file mode 100644 index 0000000000..396a56f6f9 --- /dev/null +++ b/.istanbul.yml @@ -0,0 +1,6 @@ +reporting: + print: summary + reports: + - cobertura + - html + dir: ./coverage diff --git a/eng/pipelines/ci.yaml b/eng/pipelines/ci.yaml index 9697569edf..a6c4092aed 100644 --- a/eng/pipelines/ci.yaml +++ b/eng/pipelines/ci.yaml @@ -24,6 +24,12 @@ stages: - script: npx @microsoft/rush test:ci -v displayName: Test + - task: PublishCodeCoverageResults@1 + inputs: + codeCoverageTool: Cobertura + summaryFileLocation: $(Build.SourcesDirectory)/packages/**/coverage/cobertura-coverage.xml + reportDirectory: $(Build.SourcesDirectory)/packages/**/coverage + - script: npx @microsoft/rush lint -v displayName: Lint diff --git a/eng/pipelines/templates/regression-tests.yaml b/eng/pipelines/templates/regression-tests.yaml index 75667cc7c6..2e1b759717 100644 --- a/eng/pipelines/templates/regression-tests.yaml +++ b/eng/pipelines/templates/regression-tests.yaml @@ -8,6 +8,8 @@ parameters: jobs: - job: ${{ parameters.name }} displayName: Node ${{ parameters.nodeVersion }} + variables: + autorest.home: $(Agent.SourcesDirectory) # Setting autorest.home to local path to prevent conflict with other parralel jobs in the same machine. steps: - download: current artifact: packages @@ -40,6 +42,7 @@ jobs: - script: | npm install npm install -g @autorest/compare@~0.3.6 + node -e "console.log('process env', process.env)" displayName: Install autorest-compare workingDirectory: regression-tests diff --git a/jest.default.config.js b/jest.default.config.js index 17485c2a42..a4016116b8 100644 --- a/jest.default.config.js +++ b/jest.default.config.js @@ -8,7 +8,7 @@ const config = { moduleNameMapper: {}, collectCoverage: true, collectCoverageFrom: ["src/**/*.ts", "!**/node_modules/**"], - coverageReporters: ["json", "lcov", "cobertura", "text", "html", "clover"], + coverageReporters: ["json", "html", "cobertura"], coveragePathIgnorePatterns: ["/node_modules/", ".*/test/.*"], modulePathIgnorePatterns: ["/sdk"], globals: {