-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Setup CI for unit + e2e tests - PR shows summary comments added for resolves #29
- Loading branch information
Showing
22 changed files
with
16,689 additions
and
2,551 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
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,18 @@ | ||
# This action orchestrates CI actions that can be run in parallel. This action | ||
# can be listed by any actions that use `workflow_run` as a trigger that depend | ||
# on all orchestrated actions being completed (e.g. pr-comment.yml). | ||
name: 'Orchestrator' | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
call-unit: | ||
uses: ./.github/workflows/unit.yml | ||
|
||
call-e2e: | ||
uses: ./.github/workflows/e2e.yml |
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 @@ | ||
name: End-to-end Tests | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
e2e: | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-e2e | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
- run: npm ci | ||
- name: Run end-to-end tests | ||
run: xvfb-run npm run test:e2e | ||
- name: Publish Test Summary Results | ||
if: ${{ always() }} | ||
run: | | ||
npm run report:ctrfmerge | ||
npm run report:ctrfsummary | ||
sed -i 's/<h3>Test Summary<\/h3>/<h3>End-to-end Test Summary<\/h3>/' $GITHUB_STEP_SUMMARY | ||
npm run report:prcomment | ||
- name: Save PR Number | ||
if: ${{ always() }} | ||
run: echo ${{ github.event.number }} > pr-comment/PR-number.txt | ||
- name: Upload Summary as Artifact | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: pr-comment | ||
path: pr-comment/ | ||
retention-days: 1 |
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 @@ | ||
name: Unit Tests | ||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
unit: | ||
runs-on: ubuntu-latest | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-unit | ||
cancel-in-progress: true | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version-file: '.nvmrc' | ||
cache: 'npm' | ||
- run: npm ci | ||
- name: Run ts checks, linting, and unit tests | ||
run: npm run test:ci | ||
- name: Publish Test Summary Results | ||
if: ${{ always() }} | ||
run: | | ||
npm run report:junit2ctrf | ||
npm run report:ctrfsummary | ||
sed -i 's/<h3>Test Summary<\/h3>/<h3>Unit Test Summary<\/h3>/' $GITHUB_STEP_SUMMARY | ||
npm run report:prcomment | ||
- name: Save PR Number | ||
if: ${{ always() }} | ||
run: echo ${{ github.event.number }} > pr-comment/PR-number.txt | ||
- name: Upload Summary as Artifact | ||
if: ${{ always() }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: pr-comment-unit | ||
path: pr-comment/ | ||
retention-days: 1 |
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,4 +3,6 @@ dist | |
node_modules | ||
.vscode-test/ | ||
.DS_Store | ||
.wdio-vscode-service | ||
.wdio-vscode-service | ||
e2e/reports/ | ||
test-reports/ |
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,5 +1,13 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "es5", | ||
"arrowParens": "avoid" | ||
"arrowParens": "avoid", | ||
"overrides": [ | ||
{ | ||
"files": ["*.jsonc", "*.code-snippets"], | ||
"options": { | ||
"trailingComma": "none" | ||
} | ||
} | ||
] | ||
} |
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
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,26 @@ | ||
import { browser, expect } from '@wdio/globals'; | ||
|
||
// There are some tests that can be used for reference in: | ||
// https://github.com/stateful/vscode-marquee/blob/main/test/specs | ||
|
||
describe('VS Code Extension Testing', () => { | ||
it('should be able to load VSCode', async () => { | ||
const workbench = await browser.getWorkbench(); | ||
expect(await workbench.getTitleBar().getTitle()).toContain( | ||
'[Extension Development Host]' | ||
); | ||
}); | ||
|
||
it('should load connection status bar item', async () => { | ||
const workbench = await browser.getWorkbench(); | ||
|
||
const statusBarItem = await browser.waitUntil(async () => { | ||
return workbench.getStatusBar().getItem( | ||
// icon name, display text, tooltip | ||
'debug-disconnect Deephaven: Disconnected, Connect to Deephaven' | ||
); | ||
}); | ||
|
||
expect(statusBarItem).toBeDefined(); | ||
}); | ||
}); |
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,19 @@ | ||
{ | ||
"extends": "../tsconfig.json", | ||
"compilerOptions": { | ||
"rootDir": ".", | ||
"outDir": "out", | ||
"types": [ | ||
"node", | ||
// "webdriverio/async", | ||
"@wdio/mocha-framework", | ||
"expect-webdriverio", | ||
"wdio-vscode-service" | ||
], | ||
"target": "ES2020", | ||
"moduleResolution": "node", | ||
"esModuleInterop": true | ||
}, | ||
// Override ../tsconfig.json `exclude` | ||
"exclude": ["node_modules"] | ||
} |
Oops, something went wrong.