Skip to content

Commit abf3c61

Browse files
authored
Merge pull request #3 from JuliaPluto/dr14/ci
ci: prettier lint, build, releas
2 parents 0e095d8 + fff6b6f commit abf3c61

46 files changed

Lines changed: 15321 additions & 7920 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches:
8+
- main
9+
tags:
10+
- 'v*.*.*'
11+
workflow_call: # Allow this workflow to be called by other workflows
12+
13+
jobs:
14+
validate:
15+
name: Validate
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout code
20+
uses: actions/checkout@v4
21+
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '22'
26+
cache: 'npm'
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Verify package.json and package-lock.json are in sync
32+
run: |
33+
npm ci --dry-run
34+
35+
lint:
36+
name: Lint
37+
runs-on: ubuntu-latest
38+
needs: validate
39+
40+
steps:
41+
- name: Checkout code
42+
uses: actions/checkout@v4
43+
44+
- name: Setup Node.js
45+
uses: actions/setup-node@v4
46+
with:
47+
node-version: '22'
48+
cache: 'npm'
49+
50+
- name: Install dependencies
51+
run: npm ci
52+
53+
- name: Run type checking
54+
run: npm run check-types
55+
56+
- name: Run linting
57+
run: npm run lint
58+
59+
- name: Check formatting
60+
run: npm run format:check
61+
62+
test:
63+
name: Test
64+
runs-on: ubuntu-latest
65+
needs: validate
66+
67+
steps:
68+
- name: Checkout code
69+
uses: actions/checkout@v4
70+
71+
- name: Setup Node.js
72+
uses: actions/setup-node@v4
73+
with:
74+
node-version: '22'
75+
cache: 'npm'
76+
77+
- name: Install dependencies
78+
run: npm ci
79+
80+
- name: Run unit tests
81+
run: npm run test:unit
82+
# //TODO: figureout how to run these in CI and what actually to test there
83+
# - name: Run vscode tests
84+
# run: npm test:unit
85+
86+
build:
87+
name: Build
88+
runs-on: ubuntu-latest
89+
needs: [validate, lint, test]
90+
91+
steps:
92+
- name: Checkout code
93+
uses: actions/checkout@v4
94+
95+
- name: Setup Node.js
96+
uses: actions/setup-node@v4
97+
with:
98+
node-version: '22'
99+
cache: 'npm'
100+
101+
- name: Install dependencies
102+
run: npm ci
103+
104+
- name: Build extension
105+
run: npm run package
106+
107+
- name: Get VSIX filename
108+
id: vsix_file
109+
run: |
110+
VSIX_FILE=$(ls *.vsix | head -n 1)
111+
echo "filename=$VSIX_FILE" >> $GITHUB_OUTPUT
112+
echo "Built VSIX file: $VSIX_FILE"
113+
114+
- name: Upload VSIX as artifact
115+
uses: actions/upload-artifact@v4
116+
with:
117+
name: vsix-package
118+
path: ${{ steps.vsix_file.outputs.filename }}
119+
retention-days: 90

.github/workflows/commitlint.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Commit Lint
2+
3+
on:
4+
pull_request:
5+
types: [opened, synchronize, reopened]
6+
push:
7+
branches:
8+
- main
9+
10+
jobs:
11+
commitlint-pr:
12+
name: Validate PR Commits
13+
if: github.event_name == 'pull_request'
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- name: Checkout with full history
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Setup Node.js and install dependencies
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: '22'
26+
cache: 'npm'
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
31+
- name: Validate all commits in PR
32+
run: |
33+
echo "Validating commits from ${{ github.event.pull_request.base.sha }} to ${{ github.event.pull_request.head.sha }}"
34+
npx commitlint \
35+
--from ${{ github.event.pull_request.base.sha }} \
36+
--to ${{ github.event.pull_request.head.sha }} \
37+
--verbose
38+
39+
commitlint-push:
40+
name: Validate Push Commit
41+
if: github.event_name == 'push'
42+
runs-on: ubuntu-latest
43+
44+
steps:
45+
- name: Checkout with full history
46+
uses: actions/checkout@v4
47+
with:
48+
fetch-depth: 0
49+
50+
- name: Setup Node.js and install dependencies
51+
uses: actions/setup-node@v4
52+
with:
53+
node-version: '22'
54+
cache: 'npm'
55+
56+
- name: Install dependencies
57+
run: npm ci
58+
59+
- name: Validate commit message
60+
run: |
61+
COMMIT_MSG=$(git log -1 --pretty=%B)
62+
COMMIT_SHA=$(git log -1 --pretty=%H)
63+
echo "Validating commit $COMMIT_SHA"
64+
echo "Message: $COMMIT_MSG"
65+
npx commitlint \
66+
--from HEAD~1 \
67+
--to HEAD \
68+
--verbose

.github/workflows/release.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- main # semantic-release works on branch pushes, not tags
7+
8+
permissions:
9+
contents: write # Required for creating releases and pushing commits
10+
issues: write # Required for commenting on issues
11+
pull-requests: write # Required for commenting on PRs
12+
13+
jobs:
14+
# Call the CI workflow to run all validation, linting, tests, and build
15+
ci:
16+
name: Run CI
17+
uses: ./.github/workflows/ci.yml
18+
19+
# Automated release with semantic-release
20+
release:
21+
name: Semantic Release
22+
runs-on: ubuntu-latest
23+
needs: ci
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0 # Fetch all history for semantic-release
30+
persist-credentials: false # Use custom token for pushing
31+
32+
- name: Setup Node.js
33+
uses: actions/setup-node@v4
34+
with:
35+
node-version: '22'
36+
cache: 'npm'
37+
38+
- name: Install dependencies
39+
run: npm ci
40+
41+
- name: Verify package.json and package-lock.json are in sync
42+
run: npm ci --dry-run
43+
44+
- name: Run semantic-release
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
# Uncomment if publishing to VS Code Marketplace
48+
# VSCE_PAT: ${{ secrets.VSCE_PAT }}
49+
run: |
50+
npx semantic-release
51+
52+
# Optional: Manual tag-based release (fallback if semantic-release is not used)
53+
# This job only runs when a tag is pushed
54+
# manual-release:
55+
# name: Manual Tag Release
56+
# if: startsWith(github.ref, 'refs/tags/v')
57+
# runs-on: ubuntu-latest
58+
#
59+
# steps:
60+
# - name: Checkout code
61+
# uses: actions/checkout@v4
62+
# with:
63+
# fetch-depth: 0
64+
#
65+
# - name: Get version from tag
66+
# id: get_version
67+
# run: |
68+
# TAG=${GITHUB_REF#refs/tags/}
69+
# VERSION=${TAG#v}
70+
# echo "version=$VERSION" >> $GITHUB_OUTPUT
71+
# echo "tag=$TAG" >> $GITHUB_OUTPUT
72+
#
73+
# - name: Download VSIX artifact
74+
# uses: actions/download-artifact@v4
75+
# with:
76+
# name: vsix-package
77+
#
78+
# - name: Create GitHub Release
79+
# uses: softprops/action-gh-release@v2
80+
# with:
81+
# tag_name: ${{ steps.get_version.outputs.tag }}
82+
# name: Release ${{ steps.get_version.outputs.version }}
83+
# files: '*.vsix'
84+
# env:
85+
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.prettierrc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "es5",
4+
"singleQuote": false,
5+
"printWidth": 80,
6+
"tabWidth": 2,
7+
"useTabs": false,
8+
"arrowParens": "always",
9+
"endOfLine": "lf"
10+
}

.releaserc.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"branches": ["main"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/changelog",
7+
[
8+
"@semantic-release/npm",
9+
{
10+
"npmPublish": false
11+
}
12+
],
13+
[
14+
"semantic-release-vsce",
15+
{
16+
"packageVsix": true
17+
}
18+
],
19+
[
20+
"@semantic-release/github",
21+
{
22+
"assets": [
23+
{
24+
"path": "*.vsix",
25+
"label": "VS Code Extension (VSIX)"
26+
},
27+
{
28+
"path": "CHANGELOG.md",
29+
"label": "Changelog"
30+
}
31+
]
32+
}
33+
],
34+
[
35+
"@semantic-release/git",
36+
{
37+
"assets": ["package.json", "CHANGELOG.md"],
38+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
39+
}
40+
]
41+
]
42+
}

.vscode/settings.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,14 @@
99
"dist": true // set this to false to include "dist" folder in search results
1010
},
1111
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
12-
"typescript.tsc.autoDetect": "off"
12+
"typescript.tsc.autoDetect": "off",
13+
// Jest extension configuration
14+
"jest.nodeEnv": {
15+
"NODE_OPTIONS": "--experimental-vm-modules"
16+
},
17+
// Jest Runner extension configuration
18+
// "jestrunner.jestCommand": "NODE_OPTIONS=--experimental-vm-modules node_modules/.bin/jest",
19+
"jestrunner.debugOptions": {
20+
"runtimeArgs": ["--experimental-vm-modules"]
21+
}
1322
}

CHANGELOG.md

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,28 @@
44

55
### Features
66

7-
- Pluto Notebook support for `.dyad.jl` files
7+
- Pluto Notebook support for `.pluto.jl` and `.dyad.jl` files
88
- Integrated Pluto server with automatic lifecycle management
9+
- VSCode task integration for Pluto server (terminal-based)
10+
- Interactive terminal for Julia code execution with command history
11+
- Rich output rendering (HTML, images, plots) in webviews
912
- HTTP-based MCP server for AI assistant integration
10-
- 10 VS Code commands for server and configuration management
13+
- 11 VS Code commands for server, configuration, and notebook management
1114
- 12 MCP tools for AI assistants
1215
- Real-time and ephemeral code execution
1316
- Interactive config generation for Claude Desktop and GitHub Copilot
1417
- Open notebook in browser command
1518
- Health check endpoint
1619
- Configuration settings for ports and auto-start
20+
- Shared state between extension and MCP clients
1721

1822
### Documentation
1923

20-
- Comprehensive MCP server guide
24+
- Comprehensive MCP server guide (docs/MCP.md)
25+
- Interactive terminal guide (docs/TERMINAL.md)
26+
- Pluto server task integration guide (docs/PLUTO-SERVER-TASK.md)
27+
- Development guide (CLAUDE.md)
28+
- Contributing guidelines (docs/CONTRIBUTING.md)
29+
- Semantic release workflow (docs/SEMANTIC_RELEASE.md)
2130
- Pluto.jl guide for AI tools with PlutoUI components reference
22-
- Updated README with extension overview
31+
- Updated README with extension overview and complete feature list

0 commit comments

Comments
 (0)