Skip to content

Commit 950a1e8

Browse files
authored
Merge pull request #48 from Enemuo-debug/main
DONE...
2 parents 64ffa9d + 4ea7b5b commit 950a1e8

16 files changed

Lines changed: 1618 additions & 227 deletions

File tree

.github/workflows/CI.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ main, master ]
6+
pull_request:
7+
branches: [ main, master ]
8+
9+
env:
10+
# Dummy variables for tests/builds that might expect them
11+
DATABASE_URL: postgresql://lance:lance@localhost:5432/lance
12+
NEXT_PUBLIC_E2E: "true"
13+
JUDGE_AUTHORITY_SECRET: SBU6F23AV5T5E6AXK2J5C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6
14+
ESCROW_CONTRACT_ID: CD5E6AXK2J5C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6
15+
REPUTATION_CONTRACT_ID: CD5E6AXK2J5C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6
16+
JOB_REGISTRY_CONTRACT_ID: CD5E6AXK2J5C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6C6A6
17+
OPENCLAW_API_KEY: test_key
18+
OPENCLAW_BASE_URL: http://localhost:8080
19+
20+
jobs:
21+
rust:
22+
name: Rust (Workspace)
23+
runs-on: ubuntu-latest
24+
services:
25+
postgres:
26+
image: postgres:15
27+
env:
28+
POSTGRES_USER: lance
29+
POSTGRES_PASSWORD: lance
30+
POSTGRES_DB: lance
31+
ports:
32+
- 5432:5432
33+
options: >-
34+
--health-cmd pg_isready
35+
--health-interval 10s
36+
--health-timeout 5s
37+
--health-retries 5
38+
steps:
39+
- uses: actions/checkout@v4
40+
- name: Install dependencies
41+
run: sudo apt-get update && sudo apt-get install -y libssl-dev pkg-config
42+
- name: Install Rust toolchain
43+
uses: dtolnay/rust-toolchain@v1
44+
with:
45+
toolchain: 1.88.0
46+
components: clippy, rustfmt
47+
targets: wasm32-unknown-unknown
48+
- name: Rust Cache
49+
uses: Swatinem/rust-cache@v2
50+
- name: Format
51+
run: cargo fmt --all -- --check
52+
- name: Clippy
53+
run: cargo clippy --workspace -- -D warnings
54+
- name: Test
55+
run: cargo test --workspace
56+
- name: Build Contracts
57+
run: cargo build --target wasm32-unknown-unknown --release -p escrow -p reputation -p job_registry
58+
59+
web-lint-build:
60+
name: Web Frontend
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: actions/checkout@v4
64+
- name: Setup Node.js
65+
uses: actions/setup-node@v4
66+
with:
67+
node-version: 20
68+
cache: 'npm'
69+
cache-dependency-path: apps/web/package-lock.json
70+
- name: Install dependencies
71+
run: npm install --prefix apps/web
72+
- name: Lint
73+
run: npm run lint --prefix apps/web
74+
- name: Build
75+
run: npm run build --prefix apps/web
76+
77+
playwright-e2e:
78+
name: E2E Tests (Playwright)
79+
runs-on: ubuntu-latest
80+
steps:
81+
- uses: actions/checkout@v4
82+
- name: Setup Node.js
83+
uses: actions/setup-node@v4
84+
with:
85+
node-version: 20
86+
cache: 'npm'
87+
cache-dependency-path: package-lock.json
88+
- name: Install root dependencies
89+
run: npm install
90+
- name: Install web dependencies
91+
run: npm install --prefix apps/web
92+
- name: Install Playwright Browsers
93+
run: npx playwright install --with-deps chromium
94+
- name: Run E2E tests
95+
run: npm run test:e2e
96+
env:
97+
NEXT_PUBLIC_E2E: "true"
98+
NEXT_PUBLIC_API_URL: "http://localhost:3001"

.github/workflows/ci.yml

Lines changed: 0 additions & 162 deletions
This file was deleted.

0 commit comments

Comments
 (0)