Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code coverage #25

Merged
merged 11 commits into from
Jun 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,34 @@ jobs:
strategy:
matrix:
node: [ 16, 18 ]
name: Tests on Ubuntu with Node ${{ matrix.node }}
name: Tests with code coverage on Ubuntu with Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: npm run compile
- run: |
npm install
npm run compile
# runtTests() which downloads/installs/launches VSCode requires a screen.
# Using xvfb-run to attach a virtual screen for CI running on Ubuntu.
xvfb-run --server-num=99 --server-args="-screen 0 1024x768x24" npm run test-coverage
shell: bash
- run: killall Xvfb || true
run-tests-win:
runs-on: windows-latest
strategy:
matrix:
node: [ 16, 18 ]
name: Tests on Windows with Node ${{ matrix.node }}
name: Tests with code coverage on Windows with Node ${{ matrix.node }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
- run: npm install
- run: |
# On Windows there no need for a screen for runTests() to run successfully.
npm install
npm run compile
npm run test-coverage
- run: taskkill /IM Xvfb.exe /F || true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ dist
node_modules
.vscode-test/
*.vsix
coverage/
.nyc_output/
Loading