Installs project and runs project tests #681
Workflow file for this run
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
name: run-tests | |
run-name: Installs project and runs project tests | |
on: [ push, pull_request ] | |
jobs: | |
run-tests-nix: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [ 18, 20 ] | |
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 | |
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: [ 18, 20 ] | |
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: | | |
# 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 |