Skip to content

Commit

Permalink
Print more error details for debugging and use node 14 for windows te…
Browse files Browse the repository at this point in the history
…sts (#3033)

* More error message

* Use node 14 when testing on windows
  • Loading branch information
sosukesuzuki authored Jun 19, 2023
1 parent 822ad24 commit 27a6896
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
15 changes: 15 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ jobs:
run_install: false
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
if: runner.os != 'Windows'
with:
node-version-file: ".nvmrc"
- uses: actions/setup-node@v3
if: runner.os == 'Windows'
with:
node-version: 14
- run: /usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & echo "Started xvfb"
shell: bash
if: ${{ success() && matrix.os == 'ubuntu-latest' }}
Expand All @@ -44,8 +49,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
if: runner.os != 'Windows'
with:
node-version-file: ".nvmrc"
- uses: actions/setup-node@v3
if: runner.os == 'Windows'
with:
node-version: 14
- run: yarn install
- name: Cache node modules
uses: actions/cache@v3
Expand Down Expand Up @@ -75,8 +85,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
if: runner.os != 'Windows'
with:
node-version-file: ".nvmrc"
- uses: actions/setup-node@v3
if: runner.os == 'Windows'
with:
node-version: 14
- run: yarn install
- run: npm install -g vsce
- run: vsce package
Expand Down
10 changes: 9 additions & 1 deletion src/test/runTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,16 @@ async function main() {
.concat(["--user-data-dir", userDataDirectory]),
});
} catch (error) {
// eslint-disable-next-line no-console
/* eslint-disable no-console */
console.error("Failed to run tests");
if (error instanceof Error) {
console.error("error message: " + error.message);
console.error("error name: " + error.name);
console.error("error stack: " + error.stack);
} else {
console.error("No error object: " + JSON.stringify(error));
}
/* eslint-enable no-console */
process.exit(1);
}
}
Expand Down

0 comments on commit 27a6896

Please sign in to comment.