Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
114 changes: 114 additions & 0 deletions .github/workflows/oreel-web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Oreel Web CI

on:
push:
paths:
- 'oreel-web/**'
branches: [main, develop]
pull_request:
paths:
- 'oreel-web/**'
branches: [main, develop]
workflow_dispatch:

concurrency:
group: oreel-web-${{ github.ref }}
cancel-in-progress: true

env:
NODE_VERSION: '20'

jobs:
build-and-verify:
runs-on: ubuntu-latest

defaults:
run:
working-directory: ./oreel-web

steps:
# ----------------------------------
# Checkout repository
# ----------------------------------
- name: Checkout repository
uses: actions/checkout@v4

# ----------------------------------
# Detect package manager
# ----------------------------------
- name: Detect package manager
id: detect
run: |
if [ -f pnpm-lock.yaml ]; then
echo "manager=pnpm" >> $GITHUB_OUTPUT
elif [ -f package-lock.json ]; then
echo "manager=npm" >> $GITHUB_OUTPUT
else
echo "No lockfile found. CI requires a lockfile."
exit 1
fi

# ----------------------------------
# Setup Node
# ----------------------------------
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: ${{ steps.detect.outputs.manager }}
cache-dependency-path: |
oreel-web/pnpm-lock.yaml
oreel-web/package-lock.json

# ----------------------------------
# Setup pnpm if needed
# ----------------------------------
- name: Setup pnpm
if: steps.detect.outputs.manager == 'pnpm'
uses: pnpm/action-setup@v3
with:
version: 10

# ----------------------------------
# Install Dependencies
# ----------------------------------
- name: Install dependencies (pnpm)
if: steps.detect.outputs.manager == 'pnpm'
run: pnpm install --frozen-lockfile

- name: Install dependencies (npm)
if: steps.detect.outputs.manager == 'npm'
run: npm ci

# ----------------------------------
# TypeScript Strict Type Check
# ----------------------------------
- name: Type check
run: |
if [ "${{ steps.detect.outputs.manager }}" = "pnpm" ]; then
pnpm exec tsc --noEmit
else
npx tsc --noEmit
fi

# ----------------------------------
# Run Tests (if defined)
# ----------------------------------
- name: Run tests (if available)
run: |
if [ "${{ steps.detect.outputs.manager }}" = "pnpm" ]; then
pnpm run test --if-present
else
npm run test --if-present
fi

# ----------------------------------
# Production Build (Hard Gate)
# ----------------------------------
- name: Build Next.js
run: |
if [ "${{ steps.detect.outputs.manager }}" = "pnpm" ]; then
pnpm run build
else
npm run build
fi
3 changes: 0 additions & 3 deletions oreel-web/app/(dashboard)/page.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions oreel-web/app/(marketing)/page.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions oreel-web/app/(shop)/page.tsx

This file was deleted.

3 changes: 0 additions & 3 deletions oreel-web/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
export default function RootLayout({ children }: { children: React.ReactNode }) {
return <html><body>{children}</body></html>
}
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
Expand Down
Loading
Loading