Skip to content
Open
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 12 additions & 12 deletions .github/workflows/build-universal-mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,53 +11,53 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: x86_64-apple-darwin,aarch64-apple-darwin

- name: Install web client dependencies
working-directory: ./glsp-web-client
run: npm ci

- name: Build web client
working-directory: ./glsp-web-client
run: npx vite build

- name: Install Tauri dependencies
working-directory: ./glsp-tauri
run: npm ci

- name: Build universal binary
working-directory: ./glsp-tauri
run: |
# Build for both architectures
npx tauri build --target aarch64-apple-darwin
npx tauri build --target x86_64-apple-darwin

# Create universal binary manually
mkdir -p universal-build

# Extract binaries
cp "../target/aarch64-apple-darwin/release/glsp-desktop" universal-build/glsp-desktop-arm64
cp "../target/x86_64-apple-darwin/release/glsp-desktop" universal-build/glsp-desktop-x64

# Create universal binary
lipo -create -output universal-build/glsp-desktop \
universal-build/glsp-desktop-arm64 \
universal-build/glsp-desktop-x64

# Verify
lipo -info universal-build/glsp-desktop

- name: Upload universal binary
uses: actions/upload-artifact@v3
with:
name: universal-macos-binary
path: glsp-tauri/universal-build/glsp-desktop
path: glsp-tauri/universal-build/glsp-desktop
40 changes: 20 additions & 20 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
rust: [stable]
steps:
- uses: actions/checkout@v4

- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy

- name: Cache cargo
uses: actions/cache@v3
with:
Expand All @@ -36,7 +36,7 @@ jobs:
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
Expand All @@ -48,13 +48,13 @@ jobs:
# Clean up temporary repository
sudo rm /etc/apt/sources.list.d/ubuntu22.list
sudo apt-get update

- name: Check formatting
run: cargo fmt -- --check

- name: Run clippy on server
run: cargo clippy --package glsp-mcp-server --all-targets -- -D warnings

- name: Check if web client dist exists
id: check-dist
run: |
Expand All @@ -64,14 +64,14 @@ jobs:
echo "dist_exists=false" >> $GITHUB_OUTPUT
fi
shell: bash

- name: Run clippy on Tauri
if: steps.check-dist.outputs.dist_exists == 'true'
run: cargo clippy --package glsp-desktop --all-targets --all-features -- -D warnings

- name: Run tests on server
run: cargo test --package glsp-mcp-server

- name: Run tests on Tauri
if: steps.check-dist.outputs.dist_exists == 'true'
run: cargo test --package glsp-desktop
Expand All @@ -81,18 +81,18 @@ jobs:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: glsp-web-client/package-lock.json

- name: Install dependencies
working-directory: ./glsp-web-client
run: npm ci

- name: Build
working-directory: ./glsp-web-client
run: npx vite build
Expand All @@ -105,15 +105,15 @@ jobs:
os: [ubuntu-24.04, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install Rust
uses: dtolnay/rust-toolchain@stable

- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
Expand All @@ -125,19 +125,19 @@ jobs:
# Clean up temporary repository
sudo rm /etc/apt/sources.list.d/ubuntu22.list
sudo apt-get update

- name: Install web client dependencies
working-directory: ./glsp-web-client
run: npm ci

- name: Build web client
working-directory: ./glsp-web-client
run: npx vite build

- name: Install Tauri dependencies
working-directory: ./glsp-tauri
run: npm ci

- name: Build Tauri (not bundled for CI speed)
working-directory: ./glsp-tauri
run: npx tauri build --debug
run: npx tauri build --debug
152 changes: 152 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
name: Pre-commit Checks

on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main, develop ]

jobs:
pre-commit:
runs-on: ubuntu-latest
strategy:
matrix:
toolchain: [stable]

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Needed for detect-secrets baseline

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
components: rustfmt, clippy

- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
glsp-mcp-server/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: glsp-web-client/package-lock.json

- name: Install Node.js dependencies
run: |
cd glsp-web-client
npm ci

- name: Set up Python for pre-commit
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install pre-commit
run: pip install pre-commit

- name: Cache pre-commit dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pre-commit
key: pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}

- name: Run pre-commit hooks
run: pre-commit run --all-files

# Separate job for running full test suites
tests:
runs-on: ubuntu-latest
needs: pre-commit

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

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
glsp-mcp-server/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Run Rust tests
run: |
cd glsp-mcp-server
cargo test --verbose

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: glsp-web-client/package-lock.json

- name: Install Node.js dependencies
run: |
cd glsp-web-client
npm ci

- name: Run TypeScript type check
run: |
cd glsp-web-client
npm run type-check

- name: Run frontend tests
run: |
cd glsp-web-client
npm test

- name: Build frontend
run: |
cd glsp-web-client
npm run build

# Security check job
security:
runs-on: ubuntu-latest

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

- name: Run Rust security audit
uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
working-directory: glsp-mcp-server

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'

- name: Install Node.js dependencies
run: |
cd glsp-web-client
npm ci

- name: Run npm audit
run: |
cd glsp-web-client
npm audit --audit-level moderate
Loading
Loading