Skip to content

Merge pull request #164 from viperproject/auto-update-vscode #618

Merge pull request #164 from viperproject/auto-update-vscode

Merge pull request #164 from viperproject/auto-update-vscode #618

Workflow file for this run

name: NPM Tests
on:
push:
pull_request:
workflow_dispatch:
jobs:
test:
name: test - ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
fail-fast: false # don't cancel when one matrix job fails, so we can compare to the others
runs-on: ${{ matrix.os }}
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Cache npm
uses: actions/cache@v4
with:
path: .npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install NPM dependencies
run: npm ci --cache .npm --prefer-offline
- name: Run tests (headless - non-ubuntu)
if: "!startsWith(matrix.os, 'ubuntu')"
run: npm test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run tests (headless - ubuntu only)
if: startsWith(matrix.os, 'ubuntu')
run: xvfb-run -a npm test
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}