diff --git a/.github/workflows/lint_and_test.yml b/.github/workflows/lint_and_test.yml index b75b3b0..fd0fc25 100644 --- a/.github/workflows/lint_and_test.yml +++ b/.github/workflows/lint_and_test.yml @@ -1,28 +1,38 @@ -name: Lint and Test +name: Run VSCode Extension Tests + on: push: - branches: - - master + branches: [main] pull_request: - branches: - - master + branches: [main] jobs: test: - runs-on: ubuntu-latest - + strategy: + matrix: + node-version: [22.x] + os: [ubuntu-latest, windows-latest, macos-latest] + runs-on: ${{ matrix.os }} steps: - name: Checkout code uses: actions/checkout@v4 - - name: Setup Node.js + - name: Setup Node.js environment uses: actions/setup-node@v4 with: - node-version: "20" + node-version: ${{ matrix.node-version }} cache: "npm" - name: Install dependencies run: npm ci - # Runs both the test and lint commands - - name: Run tests + + - name: Compile + run: npm run compile + + - name: Run tests (Linux) + run: xvfb-run -a npm test + if: runner.os == 'Linux' + + - name: Run tests (Windows/Mac) run: npm test + if: runner.os != 'Linux'