Skip to content

🐛 Reset Path (#104) #396

🐛 Reset Path (#104)

🐛 Reset Path (#104) #396

Workflow file for this run

name: CI (repo level)
on:
push:
branches:
- "main"
- "release-*"
pull_request:
paths-ignore:
- "docs/**"
branches:
- "main"
- "release-*"
workflow_dispatch:
workflow_call:
concurrency:
group: ci-repo-${{ github.event_name }}-${{ github.ref }}
cancel-in-progress: true
# https://typicode.github.io/husky/how-to.html#ci-server-and-docker
env:
HUSKY: 0
jobs:
build:
name: Build (${{ matrix.arch }})
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
arch: linux
- os: macos-latest
arch: macos
- os: windows-latest
arch: windows
max-parallel: 3
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Cache node_modules
uses: actions/cache@v3
with:
path: |
node_modules
vscode/node_modules
webview-ui/node_modules
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- name: Install workspace dependencies
run: |
npm ci
- name: Lint sources
run: npm run lint
test:
name: Test (${{ matrix.arch }})
runs-on: ${{ matrix.os }}
needs: build
strategy:
matrix:
include:
- os: ubuntu-latest
arch: linux
- os: macos-latest
arch: macos
- os: windows-latest
arch: windows
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Install workspace dependencies
run: |
npm ci
# Run tests on Linux
- name: Run tests (Linux)
if: matrix.arch == 'linux'
run: xvfb-run -a npm test
# Run tests on macOS
- name: Run tests (macOS)
if: matrix.arch == 'macos'
run: npm test
# Run tests on Windows
- name: Run tests (Windows)
if: matrix.arch == 'windows'
shell: cmd
run: npm test
package:
name: Package (${{ matrix.arch }})
runs-on: ${{ matrix.os }}
needs: test
strategy:
matrix:
include:
- os: ubuntu-latest
arch: linux
- os: macos-latest
arch: macos
- os: windows-latest
arch: windows
max-parallel: 3
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Install workspace dependencies
run: npm ci
- name: Build Package
run: npm run package
- name: Generate .vsix package
working-directory: ./vscode
run: |
npm install @vscode/vsce
npx vsce package
- name: Upload VSIX artifact
uses: actions/upload-artifact@v4
with:
name: vscode-extension-${{ matrix.arch }}
path: "vscode/*.vsix"