-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #118 from KxSystems/KXI-31538
test coverage
- Loading branch information
Showing
9 changed files
with
513 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ | |
name: KX VS Code CI Testing | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
pull_request: | ||
branches: | ||
- dev | ||
- main | ||
|
||
|
@@ -23,16 +23,41 @@ jobs: | |
with: | ||
node-version: 16.x | ||
- run: npm ci | ||
- run: xvfb-run -a npm test | ||
- run: xvfb-run -a npm run coverage | ||
if: runner.os == 'Linux' | ||
- run: npm test | ||
if: runner.os != 'Linux' | ||
|
||
- name: Code coverage summary | ||
if: runner.os == 'Linux' | ||
uses: irongut/[email protected] | ||
with: | ||
filename: ./coverage-reports/cobertura-coverage.xml | ||
badge: true | ||
format: markdown | ||
hide_branch_rate: true | ||
hide_complexity: true | ||
thresholds: "30 80" | ||
output: "both" | ||
|
||
- name: Write Coverage to Job Summary | ||
if: runner.os == 'Linux' | ||
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY | ||
|
||
- name: Upload lcov result for app-sec job | ||
if: runner.os == 'Linux' | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: lcov | ||
path: coverage-reports/lcov.info | ||
retention-days: 1 | ||
|
||
app-sec: | ||
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v2 | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
|
@@ -41,6 +66,11 @@ jobs: | |
with: | ||
node-version: 16.x | ||
|
||
- name: Download lcov result from test job | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: lcov | ||
|
||
- name: Install dependencies | ||
run: yarn install | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
sonar.projectKey=kxvscode | ||
sonar.sources=. | ||
sonar.sources=. | ||
sonar.javascript.lcov.reportPaths=coverage-reports/lcov.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* Copyright (c) 1998-2023 Kx Systems Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
|
||
import * as dataSourceCommand from "../../src/commands/dataSourceCommand"; | ||
import * as installTools from "../../src/commands/installTools"; | ||
import * as serverCommand from "../../src/commands/serverCommand"; | ||
import * as walkthroughCommand from "../../src/commands/walkthroughCommand"; | ||
|
||
describe("dataSourceCommand", () => { | ||
//write tests for src/commands/dataSourceCommand.ts | ||
//function to be deleted after write the tests | ||
dataSourceCommand.renameDataSource("test", "test2"); | ||
}); | ||
describe("installTools", () => { | ||
//write tests for src/commands/installTools.ts | ||
//function to be deleted after write the tests | ||
installTools.installTools(); | ||
}); | ||
describe("serverCommand", () => { | ||
//write tests for src/commands/serverCommand.ts | ||
//function to be deleted after write the tests | ||
serverCommand.addNewConnection(); | ||
}); | ||
describe("walkthroughCommand", () => { | ||
//write tests for src/commands/walkthroughCommand.ts | ||
//function to be deleted after write the tests | ||
walkthroughCommand.showInstallationDetails(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,258 @@ | ||
/* | ||
* Copyright (c) 1998-2023 Kx Systems Inc. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the | ||
* License. You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations under the License. | ||
*/ | ||
|
||
import * as ipcF64 from "../../src/ipc/F64"; | ||
import * as ipcI32 from "../../src/ipc/I32"; | ||
import * as ipcI64 from "../../src/ipc/I64"; | ||
import * as ipcOp from "../../src/ipc/Op"; | ||
import * as ipcQBoolean from "../../src/ipc/QBoolean"; | ||
import * as ipcQByte from "../../src/ipc/QByte"; | ||
import * as ipcQChar from "../../src/ipc/QChar"; | ||
import * as ipcQDate from "../../src/ipc/QDate"; | ||
import * as ipcQDateTime from "../../src/ipc/QDateTime"; | ||
import * as ipcQDict from "../../src/ipc/QDict"; | ||
import * as ipcQDouble from "../../src/ipc/QDouble"; | ||
import * as ipcQFloat from "../../src/ipc/QFloat"; | ||
import * as ipcQGuid from "../../src/ipc/QGuid"; | ||
import * as ipcQInt from "../../src/ipc/QInt"; | ||
import * as ipcQLong from "../../src/ipc/QLong"; | ||
import * as ipcQMinute from "../../src/ipc/QMinute"; | ||
import * as ipcQMonth from "../../src/ipc/QMonth"; | ||
import * as ipcQSecond from "../../src/ipc/QSecond"; | ||
import * as ipcQShort from "../../src/ipc/QShort"; | ||
import * as ipcQString from "../../src/ipc/QString"; | ||
import * as ipcQSymbol from "../../src/ipc/QSymbol"; | ||
import * as ipcQTable from "../../src/ipc/QTable"; | ||
import * as ipcQTime from "../../src/ipc/QTime"; | ||
import * as ipcQTimespan from "../../src/ipc/QTimespan"; | ||
import * as ipcQTimestamp from "../../src/ipc/QTimestamp"; | ||
import * as ipcQUnary from "../../src/ipc/QUnary"; | ||
import * as ipcSparkMD5 from "../../src/ipc/SparkMD5"; | ||
import * as ipcU8 from "../../src/ipc/U8"; | ||
import * as ipcC from "../../src/ipc/c"; | ||
import * as ipcCClasses from "../../src/ipc/cClasses"; | ||
import * as ipcParseQlist from "../../src/ipc/parse.qlist"; | ||
import * as ipcTools from "../../src/ipc/tools"; | ||
import * as ipcTypeBase from "../../src/ipc/typeBase"; | ||
import * as ipcUtils from "../../src/ipc/util"; | ||
import * as ipcVector from "../../src/ipc/vector"; | ||
|
||
describe("c", () => { | ||
//write tests for src/ipc/c.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcC; | ||
}); | ||
|
||
describe("cClasses", () => { | ||
//write tests for src/ipc/cClasses.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcCClasses; | ||
}); | ||
|
||
describe("F64", () => { | ||
//write tests for src/ipc/F64.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcF64; | ||
}); | ||
|
||
describe("I32", () => { | ||
//write tests for src/ipc/I32.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcI32; | ||
}); | ||
|
||
describe("I64", () => { | ||
//write tests for src/ipc/I64.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcI64; | ||
}); | ||
|
||
describe("Op", () => { | ||
//write tests for src/ipc/Op.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcOp; | ||
}); | ||
|
||
describe("parse qlist", () => { | ||
//write tests for src/ipc/parse.qlist.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcParseQlist; | ||
}); | ||
|
||
describe("QBoolean", () => { | ||
//write tests for src/ipc/QBoolean.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQBoolean; | ||
}); | ||
|
||
describe("QByte", () => { | ||
//write tests for src/ipc/QByte.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQByte; | ||
}); | ||
|
||
describe("QChar", () => { | ||
//write tests for src/ipc/QChar.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQChar; | ||
}); | ||
|
||
describe("QDate", () => { | ||
//write tests for src/ipc/QDate.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQDate; | ||
}); | ||
|
||
describe("QDateTime", () => { | ||
//write tests for src/ipc/QDateTime.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQDateTime; | ||
}); | ||
|
||
describe("QDict", () => { | ||
//write tests for src/ipc/QDict.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQDict; | ||
}); | ||
|
||
describe("QDouble", () => { | ||
//write tests for src/ipc/QDouble.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQDouble; | ||
}); | ||
|
||
describe("QFloat", () => { | ||
//write tests for src/ipc/QFloat.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQFloat; | ||
}); | ||
|
||
describe("QGuid", () => { | ||
//write tests for src/ipc/QGuid.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQGuid; | ||
}); | ||
|
||
describe("QInt", () => { | ||
//write tests for src/ipc/QInt.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQInt; | ||
}); | ||
|
||
describe("QLong", () => { | ||
//write tests for src/ipc/QLong.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQLong; | ||
}); | ||
|
||
describe("QMinute", () => { | ||
//write tests for src/ipc/QMinute.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQMinute; | ||
}); | ||
|
||
describe("QMonth", () => { | ||
//write tests for src/ipc/QMonth.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQMonth; | ||
}); | ||
|
||
describe("QSecond", () => { | ||
//write tests for src/ipc/QSecond.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQSecond; | ||
}); | ||
|
||
describe("QShort", () => { | ||
//write tests for src/ipc/QShort.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQShort; | ||
}); | ||
|
||
describe("QString", () => { | ||
//write tests for src/ipc/QString.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQString; | ||
}); | ||
|
||
describe("QSymbol", () => { | ||
//write tests for src/ipc/QSymbol.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQSymbol; | ||
}); | ||
|
||
describe("QTable", () => { | ||
//write tests for src/ipc/QTable.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQTable; | ||
}); | ||
|
||
describe("QTime", () => { | ||
//write tests for src/ipc/QTime.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQTime; | ||
}); | ||
|
||
describe("QTimestamp", () => { | ||
//write tests for src/ipc/QTimestamp.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQTimestamp; | ||
}); | ||
|
||
describe("QTimespan", () => { | ||
//write tests for src/ipc/QTimespan.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQTimespan; | ||
}); | ||
|
||
describe("QUnary", () => { | ||
//write tests for src/ipc/QUnary.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcQUnary; | ||
}); | ||
|
||
describe("SparkMD5", () => { | ||
//write tests for src/ipc/SparkMD5.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcSparkMD5; | ||
}); | ||
|
||
describe("tools", () => { | ||
//write tests for src/ipc/tools.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcTools; | ||
}); | ||
|
||
describe("typeBase", () => { | ||
//write tests for src/ipc/typeBase.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcTypeBase; | ||
}); | ||
|
||
describe("U8", () => { | ||
//write tests for src/ipc/U8.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcU8; | ||
}); | ||
|
||
describe("utils", () => { | ||
//write tests for src/ipc/utils.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcUtils; | ||
}); | ||
|
||
describe("Vector", () => { | ||
//write tests for src/ipc/Vector.ts | ||
//the line bellow should be deleted after write the tests | ||
ipcVector; | ||
}); |
Oops, something went wrong.