Skip to content

refactor(tests): improve test structure with Mocha and Chai #16

refactor(tests): improve test structure with Mocha and Chai

refactor(tests): improve test structure with Mocha and Chai #16

Workflow file for this run

name: CI
on:
push:
branches: [main]
tags: ['v*']
pull_request:
branches: [main]
jobs:
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 22
- name: Install dependencies
run: npm install
- name: Run lint
run: npm run lint
- name: Run tests
run: npm test
if: runner.os == 'macOS'
- name: Run tests (Linux)
run: xvfb-run -a npm test
if: runner.os == 'Linux'
- name: Package extension
run: npx vsce package
publish:
runs-on: ubuntu-latest
needs: build
if: success() && startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 22
- name: Install dependencies
run: npm install
- name: Publish
run: npx vsce publish -p ${{ secrets.VSCE_PAT }}