CI xvfb-run is not on Mac and Windows #13
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: CI | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] # macOS is not supported yet, see comment below | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm ci | |
- name: Run tests (Ubuntu with xvfb) | |
if: matrix.os == 'ubuntu-latest' | |
run: xvfb-run -a npm run test | |
# got rid of 1 error after copying to short directory, but still other errors. Not running on macOS for now. | |
- name: Run tests (macOS) | |
if: matrix.os == 'macos-latest' | |
run: | | |
mkdir -p /tmp/vscode | |
cp -r . /tmp/vscode | |
cd /tmp/vscode | |
npm run test | |
- name: Run tests (Windows) | |
if: matrix.os == 'windows-latest' | |
run: npm run test |