Skip to content

feat: add Create Workspace button to sidebar switcher (#44) #194

feat: add Create Workspace button to sidebar switcher (#44)

feat: add Create Workspace button to sidebar switcher (#44) #194

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@v7
with:
version: "v2.11.3"
test:
name: Test
runs-on: ubuntu-latest
needs: lint
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: mesh
POSTGRES_PASSWORD: mesh
POSTGRES_DB: mesh
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U mesh"
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
nats:
image: nats:2-alpine
ports:
- 4222:4222
# Note: JetStream enabled via command args
# GitHub Actions services don't support 'command',
# so we'll configure NATS connection to work without JetStream in unit tests
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Install goose
run: go install github.com/pressly/goose/v3/cmd/goose@latest
- name: Run migrations
env:
GOOSE_DRIVER: postgres
GOOSE_DBSTRING: "postgres://mesh:mesh@localhost:5432/mesh?sslmode=disable"
run: goose -dir migrations up
- name: Run tests
env:
DATABASE_URL: "postgres://mesh:mesh@localhost:5432/mesh?sslmode=disable"
REDIS_URL: "redis://localhost:6379"
NATS_URL: "nats://localhost:4222"
run: go test ./... -v -race -coverprofile=coverage.out -covermode=atomic
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.out
build:
name: Build
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
cache-dependency-path: web/pnpm-lock.yaml
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Install frontend dependencies
working-directory: web
run: pnpm install --frozen-lockfile
- name: Typecheck frontend
working-directory: web
run: pnpm typecheck
- name: Build frontend
working-directory: web
run: pnpm build
- name: Build API server
run: go build -o bin/api ./cmd/api
- name: Build MCP server
run: go build -o bin/mcp ./cmd/mcp
- name: Upload binaries
uses: actions/upload-artifact@v4
with:
name: binaries
path: bin/