Skip to content
Closed
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
101 changes: 101 additions & 0 deletions .github/workflows/backend-pr-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: backend-pr-ci

on:
pull_request:
paths:
- "backend/**"
- ".github/workflows/backend-pr-ci.yml"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: backend-pr-ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
GO_VERSION: "1.24"

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
timeout-minutes: 10

defaults:
run:
working-directory: backend

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: backend/go.sum

- name: Install golangci-lint
run: go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@latest

- name: Run golangci-lint
run: golangci-lint run --timeout=5m

build:
name: Build
runs-on: ubuntu-latest
timeout-minutes: 10

defaults:
run:
working-directory: backend

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: backend/go.sum

- name: Build WASM
run: GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o github.wasm .

test:
name: Tests
runs-on: ubuntu-latest
timeout-minutes: 15

defaults:
run:
working-directory: backend

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
cache-dependency-path: backend/go.sum

- name: Run tests (race detector)
run: go test -race -timeout 60s -coverprofile=coverage.out $(go list ./...)

- name: Upload coverage report
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: backend/coverage.out
retention-days: 7
53 changes: 53 additions & 0 deletions .github/workflows/frontend-pr-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: frontend-pr-ci

on:
pull_request:
paths:
- "frontend/**"
- ".github/workflows/frontend-pr-ci.yml"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: frontend-pr-ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
web-quality:
name: Typecheck and build frontend
runs-on: ubuntu-latest
timeout-minutes: 20

defaults:
run:
working-directory: frontend

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.2.23"

- name: Cache Bun packages
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-${{ hashFiles('frontend/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Typecheck
run: bun run typecheck

- name: Build production bundle
run: bun run build
53 changes: 53 additions & 0 deletions .github/workflows/mcp-pr-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: mcp-pr-ci

on:
pull_request:
paths:
- "mcp/**"
- ".github/workflows/mcp-pr-ci.yml"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: mcp-pr-ci-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
mcp-quality:
name: Typecheck and build MCP server
runs-on: ubuntu-latest
timeout-minutes: 10

defaults:
run:
working-directory: mcp

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: "1.2.23"

- name: Cache Bun packages
uses: actions/cache@v4
with:
path: ~/.bun/install/cache
key: ${{ runner.os }}-bun-mcp-${{ hashFiles('mcp/bun.lock') }}
restore-keys: |
${{ runner.os }}-bun-mcp-

- name: Install dependencies
run: bun install --frozen-lockfile

- name: Typecheck
run: bun run typecheck

- name: Build
run: bun run build
93 changes: 93 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
name: Build and Release Plugin Assets

on:
push:
tags:
- "v*"
workflow_dispatch:

permissions:
contents: write

jobs:
build-and-release:
runs-on: ubuntu-latest

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

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.24"

- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest

- name: Build backend WASM
working-directory: backend
run: |
set -euo pipefail
mkdir -p ../release/backend
GOOS=wasip1 GOARCH=wasm go build -buildmode=c-shared -o ../release/backend/github.wasm .

- name: Build frontend
working-directory: frontend
run: |
set -euo pipefail
bun install --frozen-lockfile
bun run build

- name: Build MCP
working-directory: mcp
run: |
set -euo pipefail
bun install --frozen-lockfile
bun run build

- name: Collect release files
run: |
set -euo pipefail
mkdir -p release/frontend
cp -R frontend/dist release/frontend/dist

mkdir -p release/mcp
cp -R mcp/dist release/mcp/dist

mkdir -p release/migrations
cp -R backend/migrations/. release/migrations/

cp plugin.json release/plugin.json

- name: Create archives
run: |
set -euo pipefail
tar -czf github-backend-wasm.tar.gz -C release/backend github.wasm
tar -czf github-frontend-dist.tar.gz -C release/frontend dist
tar -czf github-mcp-dist.tar.gz -C release/mcp dist
tar -czf github-migrations.tar.gz -C release migrations
tar -czf github-plugin-manifest.tar.gz -C release plugin.json

- name: Generate checksums
run: |
set -euo pipefail
sha256sum github-backend-wasm.tar.gz \
github-frontend-dist.tar.gz \
github-mcp-dist.tar.gz \
github-migrations.tar.gz \
github-plugin-manifest.tar.gz > checksums.txt

- name: Publish GitHub Release assets
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true
files: |
github-backend-wasm.tar.gz
github-frontend-dist.tar.gz
github-mcp-dist.tar.gz
github-migrations.tar.gz
github-plugin-manifest.tar.gz
checksums.txt
Loading
Loading