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
11 changes: 10 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
neva_ref:
description: "nevalang/neva-lsp ref (branch, tag or SHA)"
required: false
default: "master"
default: ""

concurrency:
group: ci-${{ github.ref }}
Expand Down Expand Up @@ -62,6 +62,8 @@ jobs:
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ github.event.inputs.neva_ref }}" ]; then
echo "value=${{ github.event.inputs.neva_ref }}" >> "$GITHUB_OUTPUT"
elif git ls-remote --exit-code --heads https://github.com/nevalang/neva-lsp refs/heads/main >/dev/null 2>&1; then
echo "value=main" >> "$GITHUB_OUTPUT"
else
echo "value=master" >> "$GITHUB_OUTPUT"
fi
Expand Down Expand Up @@ -127,13 +129,20 @@ jobs:
test -f bin/neva-lsp-linux-arm64
test -f bin/neva-lsp-windows-amd64.exe
test -f bin/neva-lsp-windows-arm64.exe
chmod +x bin/neva-lsp-darwin-amd64
chmod +x bin/neva-lsp-darwin-arm64
chmod +x bin/neva-lsp-linux-amd64
chmod +x bin/neva-lsp-linux-arm64

- name: Install dependencies
run: npm ci

- name: Build extension
run: npm run build

- name: Run extension integration smoke tests
run: xvfb-run -a npm run test:integration

- name: Package VSIX
run: npx vsce package

Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/release-marketplace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
release:
types: [published]
workflow_dispatch:
inputs:
neva_ref:
description: "nevalang/neva-lsp ref (branch, tag or SHA)"
required: false
default: ""

concurrency:
group: marketplace-release
Expand All @@ -27,11 +32,22 @@ jobs:
node-version: 20
cache: npm

- name: Resolve neva ref
id: neva-ref
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ -n "${{ github.event.inputs.neva_ref }}" ]; then
echo "value=${{ github.event.inputs.neva_ref }}" >> "$GITHUB_OUTPUT"
elif git ls-remote --exit-code --heads https://github.com/nevalang/neva-lsp refs/heads/main >/dev/null 2>&1; then
echo "value=main" >> "$GITHUB_OUTPUT"
else
echo "value=master" >> "$GITHUB_OUTPUT"
fi

- name: Checkout neva-lsp
uses: actions/checkout@v4
with:
repository: nevalang/neva-lsp
ref: master
ref: ${{ steps.neva-ref.outputs.value }}
path: neva-lsp

- name: Setup Go
Expand All @@ -51,6 +67,13 @@ jobs:
- name: Build LSP binaries from neva-lsp
run: ./scripts/release/build-lsp-from-neva-main.sh ./neva-lsp ./bin

- name: Ensure executable bits for unix binaries
run: |
chmod +x bin/neva-lsp-darwin-amd64
chmod +x bin/neva-lsp-darwin-arm64
chmod +x bin/neva-lsp-linux-amd64
chmod +x bin/neva-lsp-linux-arm64

- name: Verify release tag matches package version
if: github.event_name == 'release'
shell: bash
Expand All @@ -69,6 +92,9 @@ jobs:
- name: Build extension
run: npm run build

- name: Run extension integration smoke tests
run: xvfb-run -a npm run test:integration

- name: Package extension
run: npx -y @vscode/vsce@2.24.0 package -o vscode-nevalang.vsix

Expand Down
19 changes: 18 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,24 @@ Marketplace publishing is release-only: the workflow publishes to VS Code Market

### Testing

After you made/debugged changes you need to test extension locally. To do that use `make pkg` command, then open `Extensions` in VSCode and select `INSTALL from vsix...` option, finally chose generated vsce package file and restart extentions/editor.
Run automated extension smoke tests locally:

```bash
npm run test:integration
```

This launches a VS Code extension host against the `./test` workspace and verifies:

- extension activation and command registration
- language-server diagnostics flow end-to-end

If you need a manual verification pass before release, you can still package and install the VSIX:

```bash
make pkg
```

Then in VS Code open `Extensions` -> `Install from VSIX...`, choose the generated package, and restart the editor.

## Production

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The repository includes automated publishing on GitHub Release:

- Workflow: `.github/workflows/release-marketplace.yml`
- Trigger: published GitHub release (or manual `workflow_dispatch`)
- Behavior: fetches `nevalang/neva-lsp@main`, rebuilds all LSP binaries, builds and packages extension, publishes to Marketplace.
- Behavior: fetches `nevalang/neva-lsp` (prefers `main`, falls back to `master`), rebuilds all LSP binaries, builds and packages extension, publishes to Marketplace.

Required secret in GitHub repository settings:

Expand Down
1 change: 1 addition & 0 deletions docs/lsp-smoke-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Use this checklist before publishing a new extension version that bundles update

```bash
npm run check:lsp-binaries
npm run test:integration
```

## 2. Feature smoke test in VS Code
Expand Down
Loading
Loading