Skip to content

README: add Stainless mention (#21) #126

README: add Stainless mention (#21)

README: add Stainless mention (#21) #126

Workflow file for this run

name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: testpass
POSTGRES_USER: testuser
POSTGRES_DB: testdb
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
- name: Cache Go modules
uses: actions/cache@v4
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Download dependencies
run: go mod download
- name: Run go vet
run: go vet ./...
- name: Run staticcheck
uses: dominikh/[email protected]
with:
version: "2025.1.1"
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: latest
args: --timeout=5m
- name: Run unit tests
run: go test -v ./internal/... ./cmd/...
- name: Build mcp-front CLI
run: go build -o mcp-front ./cmd/mcp-front
- name: Validate config files
run: |
echo "Validating all config files in the repository..."
failed=0
# Check root level config files
for config in *.json; do
if [[ -f "$config" ]]; then
echo "Checking $config..."
if ! ./mcp-front -validate -config "$config"; then
failed=1
fi
fi
done
# Check integration test config files
for config in integration/config/*.json; do
if [[ -f "$config" ]]; then
echo "Checking $config..."
if ! ./mcp-front -validate -config "$config"; then
failed=1
fi
fi
done
if [[ $failed -eq 1 ]]; then
echo "❌ Config validation failed for one or more files"
exit 1
else
echo "✅ All config files validated successfully"
fi
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Docker image for testing
run: docker build -t mcp-front:test .
- name: Verify Docker Compose
run: |
docker --version
docker compose version || echo "Docker Compose v2 not available"
which docker-compose || echo "docker-compose command not found"
- name: Run integration tests
env:
GOOGLE_CLIENT_ID: test-client-id
GOOGLE_CLIENT_SECRET: test-client-secret
JWT_SECRET: test-jwt-secret-that-is-32-bytes!
DATABASE_URL: postgres://testuser:testpass@localhost:5432/testdb?sslmode=disable
# Shorter timeouts for CI environment
SESSION_TIMEOUT: 5s
SESSION_CLEANUP_INTERVAL: 1s
TEST_CLEANUP_WAIT_TIME: 15s
TEST_TIMER_RESET_WAIT_TIME: 15s
TEST_MULTI_USER_WAIT_TIME: 15s
run: |
cd integration
go test -v -timeout 5m