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
8 changes: 6 additions & 2 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The extension has no activation code. Changes to a snippet catalog take effect t

## Commands

There are no npm scripts, automated tests, or lint configuration. There is consequently no single-test command.
There are no npm scripts, automated tests, or lint configuration. The PR workflow mirrors these local validation commands:

```bash
# Install the locked packaging dependency
Expand All @@ -33,7 +33,11 @@ node -e "for (const f of ['snippets/snippets.json','snippets/jinja-snippets.json
npx vsce package
```

`npx vsce package` creates a `.vsix` file in the repository root; it is ignored by Git. The release workflow runs this same packaging command with Node.js 20.
`npx vsce package` creates a `.vsix` file in the repository root; it is ignored by Git. The PR workflow runs the same commands on Node.js 20, and the release workflow uses `npx vsce package` for tag publishes.

## Pull request checks

PRs should keep the snippet catalogs parseable and the package manifest valid. The CI workflow runs `npm ci`, JSON parsing for all three snippet catalogs, and `npx vsce package` on every pull request.

## Releases

Expand Down
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: PR CI

on:
pull_request:

jobs:
validate:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v7

- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Validate snippet catalogs
run: node -e "for (const f of ['snippets/snippets.json','snippets/jinja-snippets.json','snippets/django-snippets.json']) JSON.parse(require('fs').readFileSync(f, 'utf8'))"

- name: Package extension
run: npx vsce package
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,16 @@ Found a bug? Want a new snippet? Contributions are welcome!
2. **Request Features**: Have an idea? Share it!
3. **Submit PRs**: Fork, code, and submit a pull request

### Continuous Integration

Every pull request runs a small validation suite on Node.js 20:

1. `npm ci`
2. Parse all snippet catalogs as JSON
3. `npx vsce package`

If you want to mirror CI locally before opening a PR, run the same commands from the repository root.

### Suggesting New Snippets

When requesting a new snippet, please include:
Expand Down