用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/csharpfritz/SquadUI --skill github-actions-vscode-ci命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
基于 SOC 职业分类
正在显示 SKILL.md
| name | github-actions-vscode-ci |
| description | CI pipeline patterns for VS Code extensions using GitHub Actions |
| domain | devops |
| confidence | low |
| source | earned |
VS Code extensions have unique CI requirements compared to standard Node.js projects. The test runner (@vscode/test-electron) launches a real VS Code instance, which needs a display server on Linux CI runners.
VS Code extension tests using @vscode/test-electron require a virtual framebuffer on headless Linux CI. Wrap the test command with xvfb-run -a to provide a virtual X display:
- name: Run tests
run: xvfb-run -a npm test
The -a flag auto-selects a free display number, avoiding conflicts.
Add a concurrency group keyed to github.ref so duplicate runs on the same branch cancel in-progress jobs:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
This saves CI minutes when pushing multiple commits to a PR in quick succession.
Always use npm ci in CI pipelines. It installs from package-lock.json exactly, is faster, and ensures reproducible builds. It also removes node_modules first, preventing stale dependency issues.
Order CI steps from fastest to slowest: lint → compile → test. Lint catches style issues in seconds; no point compiling if lint fails. Compilation catches type errors; no point running tests if types are broken.
npm install in CI — non-deterministic; may resolve different versions than lockfile.continue-on-error: true on test steps — hides real failures; use if: always() on artifact upload instead.# Complete VS Code extension CI workflow
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
- run: npm ci
- run: npm run lint
- run: npm run compile
- name: Run tests
run: xvfb-run -a npm test
-