Skip to content

Merge pull request #278 from pgreat123/fix/integration-client-missing… #39

Merge pull request #278 from pgreat123/fix/integration-client-missing…

Merge pull request #278 from pgreat123/fix/integration-client-missing… #39

Workflow file for this run

# =============================================================================
# GuildPass CI — Runs on every push and pull request to main
# =============================================================================
name: CI
on:
push:
branches: [main, develop]
paths-ignore:
- "docs/**"
- "logo/**"
- "*.md"
pull_request:
branches: [main]
paths-ignore:
- "docs/**"
- "logo/**"
- "*.md"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# ── Lint & TypeCheck ────────────────────────────────────────────────
lint:
name: Lint & TypeCheck
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Build shared packages
run: pnpm --filter @guildpass/env build
- name: Lint
run: pnpm lint
- name: TypeCheck
run: pnpm typecheck
# ── Unit Tests ──────────────────────────────────────────────────────
test:
name: Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Build shared packages
run: pnpm --filter @guildpass/env build
- name: Run tests
run: pnpm test
env:
CI: true
# ── Environment Validation (checks schema correctness) ─────────────
env-check:
name: Env Schema Validation
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
- run: pnpm install --frozen-lockfile
- name: Build @guildpass/env
run: pnpm --filter @guildpass/env build
- name: Check dashboard env schema (mock mode — should pass)
run: node packages/env/dist/cli/index.js --app dashboard
env:
CI: true
DASHBOARD_API_MODE: mock
DASHBOARD_STORAGE_MODE: mock
- name: Check access-api env schema (minimal)
run: node packages/env/dist/cli/index.js --app access-api
env:
CI: true
DATABASE_URL: postgresql://user:pass@localhost:5432/guildpass
RPC_URL: https://eth-mainnet.g.alchemy.com/v2/test
MEMBERSHIP_CONTRACT_ADDRESS: "0x0000000000000000000000000000000000000001"
# ── Build Docker images (smoke test) ────────────────────────────────
docker-build:
name: Docker Build Smoke Test
runs-on: ubuntu-latest
timeout-minutes: 20
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Build dashboard image
uses: docker/build-push-action@v6
with:
context: .
file: apps/dashboard/Dockerfile
push: false
load: true
tags: guildpass/dashboard:ci-${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build access-api image
uses: docker/build-push-action@v6
with:
context: .
file: apps/access-api/Dockerfile
push: false
load: true
tags: guildpass/access-api:ci-${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max