Skip to content

feat(web): scaffold next.js app-router with shadcn-style nav and zust… #6

feat(web): scaffold next.js app-router with shadcn-style nav and zust…

feat(web): scaffold next.js app-router with shadcn-style nav and zust… #6

Workflow file for this run

name: CI
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
env:
# Dummy variables for tests/builds that might expect them
DATABASE_URL: postgresql://lance:lance@localhost:5432/lance
NEXT_PUBLIC_E2E: "true"
JUDGE_AUTHORITY_SECRET: SBU6F23AV5T5E6AXK2J5C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6
ESCROW_CONTRACT_ID: CD5E6AXK2J5C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6
REPUTATION_CONTRACT_ID: CD5E6AXK2J5C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6
JOB_REGISTRY_CONTRACT_ID: CD5E6AXK2J5C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6
OPENCLAW_API_KEY: test_key
OPENCLAW_BASE_URL: http://localhost:8080
jobs:
rust:
name: Rust (Workspace)
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_USER: lance
POSTGRES_PASSWORD: lance
POSTGRES_DB: lance
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@v1
with:
toolchain: 1.88.0
components: clippy, rustfmt
targets: wasm32-unknown-unknown
- name: Rust Cache
uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --workspace -- -D warnings
- name: Test
run: cargo test --workspace
- name: Build Contracts
run: cargo build --target wasm32-unknown-unknown --release -p escrow -p reputation -p job_registry
web-lint-build:
name: Web Frontend
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint -w web
- name: Build
run: npm run build -w web
playwright-e2e:
name: E2E Tests (Playwright)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
cache-dependency-path: package-lock.json
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps chromium
- name: Run E2E tests
run: npm run test:e2e
env:
NEXT_PUBLIC_E2E: "true"
NEXT_PUBLIC_API_URL: "http://localhost:3001"