first intial
Some checks failed
CI Pipeline / Lint & Test Frontend (push) Has been cancelled
CI Pipeline / Test Backend (push) Has been cancelled

This commit is contained in:
2025-09-16 22:59:46 +08:00
parent 64b5af061a
commit 6e7a8c784b
133 changed files with 31858 additions and 16 deletions

62
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,62 @@
name: CI Pipeline
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test_frontend:
name: Lint & Test Frontend
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./monorepo
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'npm'
cache-dependency-path: 'monorepo/package-lock.json'
- name: Install Dependencies
run: npm install
- name: Lint Frontend
run: npx nx lint frontend
- name: Test Frontend
run: npx nx test frontend
test_backend:
name: Test Backend
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite
coverage: none
- name: Install Composer Dependencies
working-directory: ./monorepo/apps/backend
run: composer install --prefer-dist --no-progress
- name: Prepare Laravel Environment
working-directory: ./monorepo/apps/backend
run: |
cp .env.example .env
php artisan key:generate
- name: Run PHPUnit Tests
working-directory: ./monorepo/apps/backend
run: php artisan test