Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
96f6e05
Introduce jest
May 21, 2020
3426ff3
Install jest
May 21, 2020
17fb2c5
Add jest.config.js
Jun 3, 2020
802c2b7
Rename to jest.config.json
Jun 3, 2020
9c3fbca
Fix dir workspace
Jun 3, 2020
0b474bf
Fix dir workspace
Jun 3, 2020
1f393d7
Install coveralls earlier
Jun 3, 2020
d3b5f15
Add run mocha lcov reporter
Jun 4, 2020
f7ecc4f
Disable jest --coverage
Jun 4, 2020
13e9abb
Remove path "node_modules/.bin/" from jscover command
Jun 4, 2020
b6891ec
Try rush report-coverage
Jun 4, 2020
a4d069c
Ren script report-coverage to reportcoverage
Jun 4, 2020
9136500
Try "coverage", look for .coverage files
Jun 4, 2020
c2ec8b1
Fix Copy .coverage files
Jun 4, 2020
187b235
Fix rush coverage
Jun 4, 2020
1c748c7
Add rush report -v
Jun 4, 2020
916198e
Add rush reportcoverage
Jun 4, 2020
38a362d
Separate rush coverage and rush report
Jun 4, 2020
785e5b2
Add set COVERALLS_REPO_TOKEN
Jun 4, 2020
5120772
Show env vars
Jun 4, 2020
c4571dc
Use var TokenForCoveralls to set env var
Jun 4, 2020
4e0e067
Send coverage to ../../coverage/commandcoverage.lcov
Jun 4, 2020
548e019
Add Create coverage folder
Jun 4, 2020
f4a4830
Mocha redirect without reporter spec
Jun 4, 2020
5551c6d
Return to reportcoverage
Jun 4, 2020
1bde262
Publish coverage artifacts
Jun 5, 2020
a7fd602
Fix copy files
Jun 5, 2020
9807d1e
Try 2 reporters
Jun 5, 2020
f7b6cc9
Add .nycrc files
Jun 5, 2020
d9347dc
Restore report scripts
Jun 5, 2020
b5eb69c
Add dependency nock
Jun 5, 2020
60eb718
Dependencies tweaks
Jun 5, 2020
245d2e2
Dummy change.
Jun 8, 2020
d63933b
Set up codecov reporting
Jun 9, 2020
694137b
Fix codecov url
Jun 9, 2020
5129f10
Fix codecov target url again
Jun 9, 2020
e54a902
Add task to Populate Code Coverage tab
Jun 9, 2020
5a8c036
Add coverage url build tag
Jun 9, 2020
5134edf
Clean up .yml
Jun 10, 2020
c38d97c
Clean up .yml 2
Jun 10, 2020
c9da0b1
clean up scripts
Jun 10, 2020
caac2b1
Cleanup 3
Jun 10, 2020
e86cd58
Cleanup 4
Jun 10, 2020
8d9290a
Merge branch 'master' into v-bruhal/coveralls5-20
Jun 11, 2020
7e00ba0
Merge branch 'master' into v-bruhal/coveralls5-20
Jun 16, 2020
cbd64a6
Set script "coverage": "nyc npm run test"
Jun 17, 2020
953ede5
Merge branch 'v-bruhal/coveralls5-20' of https://github.com/microsoft…
Jun 17, 2020
52ba265
Add html reporter back
Jun 17, 2020
abf3823
Merge branch 'master' into v-bruhal/coveralls5-20
Jun 24, 2020
3db34f0
Remove nock from package.json files
Jun 26, 2020
f502157
Revert "Remove nock from package.json files"
Jun 26, 2020
d764c08
Merge branch 'master' into v-bruhal/coveralls5-20
Jun 29, 2020
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
66 changes: 43 additions & 23 deletions build/botframework-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,6 @@ pr:
branches:
include:
- master
paths:
include:
- '*'
exclude:
- README.md
- specs/*
- PortingMap.md
- ToolLifetimeSchedule.md
- AzureCli.md
- CONTRIBUTING.md
- LICENSE
- PRIVACY.md

jobs:
- job: CLI
Expand All @@ -37,15 +25,14 @@ jobs:
inputs:
tags: 'Version=$(_version)'
continueOnError: true
condition: and(succeeded(), eq(variables['System.PullRequest.IsFork'], 'False'))

- task: NodeTool@0
displayName: 'Use Node 12.x'
inputs:
versionSpec: 12.x

- task: Npm@1
displayName: 'Install rush'
displayName: 'npm install --global @microsoft/rush'
inputs:
command: custom
verbose: false
Expand All @@ -55,10 +42,41 @@ jobs:
displayName: 'rush update'

- script: 'rush build -p 2'
displayName: 'rush build'
displayName: 'rush build -p 2'

- script: 'rush coverage -v'
displayName: 'rush coverage -v'

- script: 'rush test -p 2 -v'
displayName: 'rush test'
- bash: 'bash <(curl -s https://codecov.io/bash)'
displayName: 'push coverage report to codecov.io - https://codecov.io/github/microsoft/botframework-cli/commit/$(Build.SourceVersion)'
env:
CODECOV_TOKEN: $(TokenForCodecov)

- task: colinsalmcorner.colinsalmcorner-buildtasks.tag-build-task.tagBuildOrRelease@0
displayName: 'Tag Build with coverage url'
inputs:
tags: 'https://codecov.io/gh/microsoft/botframework-cli/tree/$(Build.SourceVersion)/packages'
continueOnError: true

- task: PublishCodeCoverageResults@1
displayName: 'Populate Code Coverage tab'
inputs:
codeCoverageTool: 'cobertura' # Options: cobertura, jaCoCo
summaryFileLocation: $(System.DefaultWorkingDirectory)/packages/*/coverage/cobertura-coverage.xml
continueOnError: true

- task: CopyFiles@2
displayName: 'Copy coverage files to: $(Build.StagingDirectory)/coverage'
inputs:
SourceFolder: '$(Build.SourcesDirectory)/packages'
Contents: '*/coverage/**'
TargetFolder: '$(Build.StagingDirectory)/coverage'

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: coverage'
inputs:
PathtoPublish: '$(Build.ArtifactStagingDirectory)/coverage'
ArtifactName: coverage

- script: 'rush posttest'
displayName: 'rush posttest'
Expand All @@ -67,21 +85,23 @@ jobs:
displayName: 'Version and Pack'

- task: CopyFiles@2
displayName: 'Copy Files to: $(Build.ArtifactStagingDirectory)'
displayName: 'Copy packages to: $(Build.ArtifactStagingDirectory)/drop'
inputs:
SourceFolder: ./.output
Contents: '**/*.tgz'
TargetFolder: '$(Build.ArtifactStagingDirectory)'
TargetFolder: '$(Build.ArtifactStagingDirectory)/drop'
flattenFolders: true

- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact: drop'
inputs:
artifactName: 'drop'
PathtoPublish: '$(Build.ArtifactStagingDirectory)/drop'
ArtifactName: drop

- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'

- script: 'rush report:coverage'
displayName: 'rush report:coverage'
enabled: false
- powershell: 'Get-ChildItem .. -ErrorAction Continue -Recurse -Force | Where {$_.FullName -notlike "*node_modules*"}'
displayName: 'Dir workspace except node_modules'
continueOnError: true
condition: succeededOrFailed()
2 changes: 1 addition & 1 deletion common/config/rush/command-line.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"commandKind": "global",
"name": "pack",
"summary": "Create .tgz packages for publishing in CI",
"description":"This doesn't currently work because rush doesn't allow the passing of arbitrary commands like version numbers yet. \n Use node ./common/scripts/version-and-pack.js --version X.X.X-tag instead.",
"description": "This doesn't currently work because rush doesn't allow the passing of arbitrary commands like version numbers yet. \n Use node ./common/scripts/version-and-pack.js --version X.X.X-tag instead.",
"shellCommand": "node -e \"throw new Error(`Not supported yet. \\nUse node ./common/scripts/version-and-pack.js --version X.X.X-tag instead`)\""
},
/**
Expand Down
7 changes: 4 additions & 3 deletions packages/chatdown/.nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
"**/*.d.ts"
],
"reporter": [
"text",
"html"
"html",
"lcov",
"text"
],
"all": true,
"cache": true,
"extends": "@istanbuljs/nyc-config-typescript",
"check-coverage": false
}
}
9 changes: 4 additions & 5 deletions packages/chatdown/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
"author": "Microsoft",
"bugs": "https://github.com/microsoft/botframework-cli",
"dependencies": {
"@microsoft/bf-cli-command": "1.0.0",
"@oclif/command": "~1.5.19",
"@oclif/config": "~1.13.3",
"botframework-schema": "^4.5.1",
"chalk": "2.4.1",
"@microsoft/bf-cli-command": "1.0.0",
"cli-table3": "^0.5.1",
"fs-extra": "^5.0.0",
"glob": "^7.1.3",
Expand Down Expand Up @@ -69,13 +69,12 @@
"prepack": "npm run clean && npm run build && npm run doc:readme",
"postpack": "rimraf oclif.manifest.json",
"posttest": "tslint -p test -t stylish",
"build":"tsc -b",
"clean":"rimraf ./.nyc_output ./lib ./package-lock.json ./tsconfig.tsbuildinfo",
"build": "tsc -b",
"clean": "rimraf ./.nyc_output ./lib ./package-lock.json ./tsconfig.tsbuildinfo",
"test": "mocha",
"coverage": "nyc npm run test",
"report:coverage":"npm run coverage && nyc report --reporter=text-lcov | coveralls",
"doc": "npm run build && npm run doc:readme && rimraf oclif.manifest.json",
"doc:readme":"oclif-dev manifest && oclif-dev readme",
"doc:readme": "oclif-dev manifest && oclif-dev readme",
"version": "npm run doc:readme && git add README.md"
}
}
7 changes: 4 additions & 3 deletions packages/cli/.nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
"**/*.d.ts"
],
"reporter": [
"text",
"html"
"html",
"lcov",
"text"
],
"all": true,
"cache": true,
"extends": "@istanbuljs/nyc-config-typescript",
"check-coverage": false
}
}
3 changes: 2 additions & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"clean": "rimraf ./.nyc_output ./lib ./package-lock.json ./tsconfig.tsbuildinfo",
"test": "mocha",
"coverage": "nyc npm run test",
"report:coverage": "npm run coverage && nyc report --reporter=text-lcov | coveralls",
"doc": "npm run clean && npm run build && npm run doc:readme && rimraf oclif.manifest.json",
"doc:readme": "oclif-dev manifest && oclif-dev readme",
"version": "oclif-dev manifest"
Expand Down Expand Up @@ -82,10 +81,12 @@
"@types/chai": "^4.1.7",
"@types/fs-extra": "^5.0.5",
"@types/mocha": "^5.2.6",
"@types/nock": "^11.1.0",
"@types/node": "^10.14.6",
"chai": "^4.2.0",
"globby": "^8.0.2",
"mocha": "^6.2.2",
"nock": "^11.7.0",
"nyc": "^14.1.1",
"rimraf": "^2.6.3",
"ts-node": "^8.1.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/command/.nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@
"**/*.d.ts"
],
"reporter": [
"text",
"html"
"html",
"lcov",
"text"
],
"all": true,
"cache": true,
Expand Down
8 changes: 4 additions & 4 deletions packages/command/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,12 @@
"prepack": "",
"postpack": "",
"posttest": "",
"build":"tsc -b",
"clean":"rimraf ./.nyc_output ./lib ./package-lock.json ./tsconfig.tsbuildinfo",
"build": "tsc -b",
"clean": "rimraf ./.nyc_output ./lib ./package-lock.json ./tsconfig.tsbuildinfo",
"test": "mocha",
"coverage": "nyc npm run test",
"report:coverage":"npm run coverage && nyc report --reporter=text-lcov | coveralls",
"doc": "",
"doc:readme":"",
"doc:readme": "",
"version": ""
},
"types": "./lib/index.d.ts",
Expand Down Expand Up @@ -55,6 +54,7 @@
"chai": "^4.2.0",
"fancy-test": "^1.4.3",
"mocha": "^6.2.2",
"nock": "^11.7.0",
"nyc": "^14.1.1",
"proxyquire": "^2.1.0",
"rimraf": "^2.6.3",
Expand Down
7 changes: 4 additions & 3 deletions packages/config/.nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
"**/*.d.ts"
],
"reporter": [
"text",
"html"
"html",
"lcov",
"text"
],
"all": true,
"cache": true,
"extends": "@istanbuljs/nyc-config-typescript",
"check-coverage": false
}
}
7 changes: 3 additions & 4 deletions packages/config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@
"scripts": {
"postpack": "rimraf oclif.manifest.json",
"posttest": "tslint -p test -t stylish",
"build":"tsc -b",
"clean":"rimraf ./.nyc_output ./lib ./package-lock.json ./tsconfig.tsbuildinfo",
"build": "tsc -b",
"clean": "rimraf ./.nyc_output ./lib ./package-lock.json ./tsconfig.tsbuildinfo",
"test": "mocha",
"coverage": "nyc npm run test",
"report:coverage":"npm run coverage && nyc report --reporter=text-lcov | coveralls",
"doc": "npm run build && npm run doc:readme && rimraf oclif.manifest.json",
"doc:readme":"oclif-dev manifest && oclif-dev readme",
"doc:readme": "oclif-dev manifest && oclif-dev readme",
"version": "npm run doc:readme && git add README.md"
},
"telemetry": null,
Expand Down
7 changes: 4 additions & 3 deletions packages/dialog/.nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
"**/*.d.ts"
],
"reporter": [
"text",
"html"
"html",
"lcov",
"text"
],
"all": true,
"cache": true,
"extends": "@istanbuljs/nyc-config-typescript",
"check-coverage": false
}
}
1 change: 0 additions & 1 deletion packages/dialog/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"clean": "rimraf ./.nyc_output ./lib ./package-lock.json ./tsconfig.tsbuildinfo",
"test": "mocha",
"coverage": "nyc npm run test",
"report:coverage": "npm run coverage && nyc report --reporter=text-lcov | coveralls",
"doc": "npm run build && npm run doc:readme && rimraf oclif.manifest.json",
"doc:readme": "oclif-dev manifest && oclif-dev readme",
"version": "npm run doc:readme && git add README.md"
Expand Down
24 changes: 24 additions & 0 deletions packages/dispatcher/.nycrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"extension": [
".ts",
".js"
],
"include": [
"src"
],
"exclude": [
"**/node_modules/**",
"**/tests/**",
"**/coverage/**",
"**/*.d.ts"
],
"reporter": [
"html",
"lcov",
"text"
],
"all": true,
"cache": true,
"extends": "@istanbuljs/nyc-config-typescript",
"check-coverage": false
}
7 changes: 3 additions & 4 deletions packages/dispatcher/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,12 @@
"prepack": "npm run clean && npm run build && npm run doc:readme",
"postpack": "rimraf oclif.manifest.json",
"posttest": "tslint -p test -t stylish",
"build":"tsc -b",
"clean":"rimraf ./.nyc_output ./lib ./package-lock.json ./tsconfig.tsbuildinfo",
"build": "tsc -b",
"clean": "rimraf ./.nyc_output ./lib ./package-lock.json ./tsconfig.tsbuildinfo",
"test": "mocha",
"coverage": "nyc npm run test",
"report:coverage":"npm run coverage && nyc report --reporter=text-lcov | coveralls",
"doc": "npm run build && npm run doc:readme && rimraf oclif.manifest.json",
"doc:readme":"oclif-dev manifest && oclif-dev readme",
"doc:readme": "oclif-dev manifest && oclif-dev readme",
"version": "npm run doc:readme && git add README.md"
}
}
7 changes: 4 additions & 3 deletions packages/lg/.nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
"**/*.d.ts"
],
"reporter": [
"text",
"html"
"html",
"lcov",
"text"
],
"all": true,
"cache": true,
"extends": "@istanbuljs/nyc-config-typescript",
"check-coverage": false
}
}
3 changes: 1 addition & 2 deletions packages/lg/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,14 @@
},
"repository": "https://github.com/microsoft/botframework-cli/tree/master/packages/lg",
"scripts": {
"unittest":"rush test -t @microsoft/bf-lg-cli",
"unittest": "rush test -t @microsoft/bf-lg-cli",
"posttest": "eslint . --ext .ts --config .eslintrc",
"prepack": "rm -rf lib && tsc -b && oclif-dev manifest && oclif-dev readme",
"postpack": "rimraf oclif.manifest.json",
"build": "tsc -b",
"clean": "rimraf ./.nyc_output ./lib ./package-lock.json ./tsconfig.tsbuildinfo",
"test": "mocha",
"coverage": "nyc npm run test",
"report:coverage": "npm run coverage && nyc report --reporter=text-lcov | coveralls",
"doc": "npm run build && npm run doc:readme && rimraf oclif.manifest.json",
"doc:readme": "oclif-dev manifest && oclif-dev readme",
"version": "npm run doc:readme && git add README.md"
Expand Down
7 changes: 4 additions & 3 deletions packages/lu/.nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,12 @@
"**/*.d.ts"
],
"reporter": [
"text",
"html"
"html",
"lcov",
"text"
],
"all": true,
"cache": true,
"extends": "@istanbuljs/nyc-config-typescript",
"check-coverage": false
}
}
Loading