Skip to content

Commit

Permalink
Adding support for function (#156)
Browse files Browse the repository at this point in the history
* Adding support for function
  • Loading branch information
sudhirverma authored Jan 19, 2022
1 parent 6b4949e commit b5cb711
Show file tree
Hide file tree
Showing 53 changed files with 3,701 additions and 237 deletions.
44 changes: 23 additions & 21 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
build:
Expand All @@ -15,22 +15,24 @@ jobs:
node: [10]

steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm run build
- name: Run headless test
uses: GabrielBB/xvfb-action@v1.0
with:
run: npm test
- name: Run UI tests
uses: GabrielBB/xvfb-action@v1.0
with:
run: npm run base-ui-test
- uses: codecov/codecov-action@v1
name: codecov-upload
with:
file: ./coverage/coverage-final.json
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm run build
- name: Run headless test
uses: GabrielBB/xvfb-action@v1.0
with:
run: npm test
- name: Run UI tests
uses: GabrielBB/xvfb-action@v1.0
with:
run: npm run base-ui-test
- uses: codecov/codecov-action@v1
name: codecov-upload
with:
file: ./coverage/coverage-final.json
78 changes: 59 additions & 19 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,35 @@
"type": "extensionHost",
"request": "launch",
"runtimeExecutable": "${execPath}",
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
"outFiles": ["${workspaceFolder}/out/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
"args": [
"--extensionDevelopmentPath=${workspaceFolder}"
],
"outFiles": [
"${workspaceFolder}/out/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}",
"env": {
"VSCODE_REDHAT_TELEMETRY_DEBUG": "true"
}
},
{
"name": "Extension Tests Debug",
"type": "extensionHost",
"request": "launch",
"sourceMaps": true,
"runtimeExecutable": "${execPath}",
"args": [
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test"
],
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "npm: watch",
"env": {
"VST_DISABLE_COVERAGE": "true",
"VSCODE_REDHAT_TELEMETRY_DEBUG": "true"
}
},
{
"name": "Extension Tests",
Expand All @@ -23,30 +49,44 @@
"--extensionDevelopmentPath=${workspaceFolder}",
"--extensionTestsPath=${workspaceFolder}/out/test/index"
],
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
"preLaunchTask": "${defaultBuildTask}"
"outFiles": [
"${workspaceFolder}/out/test/**/*.js"
],
"preLaunchTask": "${defaultBuildTask}",
"env": {
"VSCODE_REDHAT_TELEMETRY_DEBUG": "true"
}
},
{
"name": "Debug UI Tests",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/extest",
"args": [
"setup-and-run",
"${workspaceFolder}/out/test/ui-test/baseTestsSuite.js",
"--mocha_config",
"${workspaceFolder}/test/ui-test/.mocharc-debug.js"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen"
"name": "Debug UI Tests",
"type": "node",
"request": "launch",
"program": "${workspaceFolder}/node_modules/.bin/extest",
"args": [
"setup-and-run",
"${workspaceFolder}/out/test/ui-test/baseTestsSuite.js",
"--mocha_config",
"${workspaceFolder}/test/ui-test/.mocharc-debug.js"
],
"console": "integratedTerminal",
"internalConsoleOptions": "neverOpen",
"env": {
"VSCODE_REDHAT_TELEMETRY_DEBUG": "true"
}
},
{
"type": "node",
"request": "launch",
"name": "Launch Program",
"runtimeArgs": ["--version"],
"runtimeArgs": [
"--version"
],
"outputCapture": "std",
"runtimeVersion": "14.16.1"
"runtimeVersion": "14.16.1",
"env": {
"VSCODE_REDHAT_TELEMETRY_DEBUG": "true"
}
}
]
}

6 changes: 3 additions & 3 deletions build/verify-tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function verifyTools(): void {
// });
// }

const fileCheckRegex = /\w*kn-cli-config.json/;
const fileCheckRegex = /\w*cli-config.json/;

exec('git diff --name-only origin/main -- .', (error, stdout) => {
if (error) {
Expand All @@ -82,9 +82,9 @@ exec('git diff --name-only origin/main -- .', (error, stdout) => {
console.log('The changed files:');
console.log(stdout);
if (fileCheckRegex.test(stdout)) {
console.log('tools.json is changed, starting download verification');
console.log('cli-config.json is changed, starting download verification');
verifyTools();
} else {
console.log('tools.json is not changed, skipping download verification');
console.log('cli-config.json is not changed, skipping download verification');
}
});
Loading

0 comments on commit b5cb711

Please # to comment.