Skip to content

Commit

Permalink
fixup! fixup! fixup! fixup! fixup! Fix Run tests failure reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
EduardSergeev committed Aug 27, 2023
1 parent be1b001 commit 4fb5e41
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- run: npm install

- name: Run tests
uses: GabrielBB/xvfb-action@v1
uses: smithki/xvfb-action@v1.1.2
with:
run: npm run test

Expand Down
15 changes: 5 additions & 10 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,10 @@ jobs:
- run: npm install

- name: Run Linux tests
if: runner.os == 'Linux'
run: |
sudo apt-get install -y xvfb
xvfb-run --auto-servernum npm run test
- name: Run Windows & MacOS tests
if: runner.os != 'Linux'
run: npm run test
- name: Run tests
uses: smithki/xvfb-action@v1.1.2
with:
run: npm test

- name: Add GHC extension output (on failure on Linux or MacOS)
if: failure() && runner.os != 'Windows'
Expand Down Expand Up @@ -82,7 +77,7 @@ jobs:
- run: npm install

- name: Run tests with coverage
uses: GabrielBB/xvfb-action@v1
uses: smithki/xvfb-action@v1.1.2
with:
run: npm run coverage

Expand Down
5 changes: 4 additions & 1 deletion src/test/runTest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ async function main(): Promise<number> {
});
}

// This is required for Mocha tests to report non-zero exit code in case of test failure
process.removeAllListeners('exit');

// Download VS Code, unzip it and run the integration test
return await runTests({
vscodeExecutablePath,
Expand All @@ -62,7 +65,7 @@ async function main(): Promise<number> {
} catch (err) {
console.error(err);
console.error('Failed to run tests');
return 1;
process.exit(1);
}
}

Expand Down

0 comments on commit 4fb5e41

Please sign in to comment.