Consolidate webapp structure by merging nested components into the main repository
This commit is contained in:
145
.github/workflows/ci.yml
vendored
Normal file
145
.github/workflows/ci.yml
vendored
Normal file
@@ -0,0 +1,145 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, develop]
|
||||
pull_request:
|
||||
branches: [main, develop]
|
||||
|
||||
jobs:
|
||||
# Frontend CI
|
||||
frontend-lint:
|
||||
name: Frontend Lint
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "18"
|
||||
cache: "npm"
|
||||
cache-dependency-path: webapp/package-lock.json
|
||||
- name: Install dependencies
|
||||
working-directory: webapp
|
||||
run: npm ci
|
||||
- name: Lint
|
||||
working-directory: webapp
|
||||
run: npm run lint
|
||||
|
||||
frontend-type-check:
|
||||
name: Frontend Type Check
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "18"
|
||||
cache: "npm"
|
||||
cache-dependency-path: webapp/package-lock.json
|
||||
- name: Install dependencies
|
||||
working-directory: webapp
|
||||
run: npm ci
|
||||
- name: Type check
|
||||
working-directory: webapp
|
||||
run: npx tsc --noEmit
|
||||
|
||||
frontend-build:
|
||||
name: Frontend Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "18"
|
||||
cache: "npm"
|
||||
cache-dependency-path: webapp/package-lock.json
|
||||
- name: Install dependencies
|
||||
working-directory: webapp
|
||||
run: npm ci
|
||||
- name: Build
|
||||
working-directory: webapp
|
||||
run: npm run build
|
||||
- name: Upload build artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: frontend-build
|
||||
path: webapp/.next
|
||||
|
||||
frontend-e2e:
|
||||
name: Frontend E2E Tests
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "18"
|
||||
cache: "npm"
|
||||
cache-dependency-path: webapp/package-lock.json
|
||||
- name: Install dependencies
|
||||
working-directory: webapp
|
||||
run: npm ci
|
||||
- name: Install Playwright
|
||||
working-directory: webapp
|
||||
run: npx playwright install --with-deps
|
||||
- name: Run E2E tests
|
||||
working-directory: webapp
|
||||
run: npm run test:e2e
|
||||
- name: Upload test results
|
||||
uses: actions/upload-artifact@v4
|
||||
if: always()
|
||||
with:
|
||||
name: playwright-report
|
||||
path: webapp/playwright-report/
|
||||
|
||||
# Orchestrator CI
|
||||
orchestrator-build:
|
||||
name: Orchestrator Build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "18"
|
||||
cache: "npm"
|
||||
cache-dependency-path: orchestrator/package-lock.json
|
||||
- name: Install dependencies
|
||||
working-directory: orchestrator
|
||||
run: npm ci
|
||||
- name: Build
|
||||
working-directory: orchestrator
|
||||
run: npm run build
|
||||
|
||||
# Smart Contracts CI
|
||||
contracts-compile:
|
||||
name: Contracts Compile
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "18"
|
||||
cache: "npm"
|
||||
cache-dependency-path: contracts/package-lock.json
|
||||
- name: Install dependencies
|
||||
working-directory: contracts
|
||||
run: npm ci
|
||||
- name: Compile contracts
|
||||
working-directory: contracts
|
||||
run: npm run compile
|
||||
|
||||
contracts-test:
|
||||
name: Contracts Test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "18"
|
||||
cache: "npm"
|
||||
cache-dependency-path: contracts/package-lock.json
|
||||
- name: Install dependencies
|
||||
working-directory: contracts
|
||||
run: npm ci
|
||||
- name: Run tests
|
||||
working-directory: contracts
|
||||
run: npm run test
|
||||
|
||||
48
.github/workflows/release.yml
vendored
Normal file
48
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,48 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: Release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "18"
|
||||
|
||||
- name: Build Frontend
|
||||
working-directory: webapp
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Build Orchestrator
|
||||
working-directory: orchestrator
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Compile Contracts
|
||||
working-directory: contracts
|
||||
run: |
|
||||
npm ci
|
||||
npm run compile
|
||||
|
||||
- name: Create Release
|
||||
uses: softprops/action-gh-release@v1
|
||||
with:
|
||||
files: |
|
||||
webapp/.next/**
|
||||
orchestrator/dist/**
|
||||
contracts/artifacts/**
|
||||
generate_release_notes: true
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in New Issue
Block a user