Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 22 additions & 25 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,59 +1,56 @@
# CI for VS Code Extension
# -----------------------
# This workflow validates Pull Requests before merging into main.
# This workflow runs on Pull Requests targeting the main branch.
# It ensures that the extension installs dependencies correctly
# and that the TypeScript sources compile without errors.
#
# Design goals:
# - Low maintenance and low noise
# - Deterministic Node version via .nvmrc
# - pnpm-based dependency management
# - Compile-only check (no tests yet)
#
# This is the recommended baseline CI for a VS Code extension.
# Scope:
# - Node.js version is defined by .nvmrc
# - Dependencies are managed with pnpm
# - Only compilation is verified (no tests are executed)

name: CI

# Run CI only on Pull Requests targeting main
on:
pull_request:
branches:
- main

jobs:
compile:
# Ubuntu is the standard and most stable runner for VS Code extensions
# Ubuntu provides a stable and widely supported environment
# for building and compiling VS Code extensions.
runs-on: ubuntu-latest

steps:
# Checkout repository source code
# Fetch the repository contents for the workflow run
- name: Checkout repository
uses: actions/checkout@v4

# Setup pnpm
# - Installs a pinned pnpm version
# - Enables native pnpm store caching
# - More reliable on modern Ubuntu runners than setup-node caching
# Install pnpm and make it available in the environment.
# pnpm also manages its own dependency store cache.
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
cache: true

# Setup Node.js runtime
# - Uses .nvmrc as the single source of truth
# - No dependency caching here (handled by pnpm)
# Configure the Node.js runtime using the version
# specified in the .nvmrc file.
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "pnpm"
cache-dependency-path: "pnpm-lock.yaml"

# Install dependencies
# - Ensures pnpm-lock.yaml is respected
# - Fails fast if the lockfile is out of sync
# Install dependencies exactly as defined in pnpm-lock.yaml.
# The workflow will fail if the lockfile and package.json
# are not in sync.
- name: Install dependencies
run: pnpm install --frozen-lockfile

# Compile VS Code extension
# - Typically runs TypeScript compilation (tsc)
# - Core validation step for this project
# Compile the VS Code extension.
# This step typically runs the TypeScript compiler and
# validates the project configuration.
- name: Compile extension
run: pnpm compile
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -941,12 +941,10 @@
"prepare": "husky"
},
"devDependencies": {
"@biomejs/biome": "2.3.12",
"@biomejs/biome": "2.3.13",
"@commitlint/cli": "^20.3.1",
"@commitlint/config-conventional": "^20.3.1",
"@compodoc/compodoc": "^1.2.1",
"@types/glob": "^9.0.0",
"@types/minimatch": "^6.0.0",
"@types/mocha": "^10.0.10",
"@types/node": "^24.10.9",
"@types/vscode": "^1.90.0",
Expand All @@ -957,6 +955,7 @@
"glob": "^13.0.0",
"husky": "^9.1.7",
"lint-staged": "^16.2.7",
"minimatch": "^10.1.1",
"rimraf": "^6.1.2",
"typescript": "^5.9.3"
},
Expand Down
101 changes: 41 additions & 60 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading