Import the existing local project snapshot. This commit organizes existing files; it does not represent newly developed functionality.
81 lines
1.6 KiB
YAML
81 lines
1.6 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main, dev, master]
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
backend:
|
|
name: Backend — lint / typecheck / test
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: backend
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: backend/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
- name: Type-check
|
|
run: npm run typecheck
|
|
|
|
- name: Run tests
|
|
run: npm test
|
|
env:
|
|
NODE_ENV: test
|
|
PUBLIC_APP_URL: http://localhost:5173
|
|
FRONTEND_URL: http://localhost:5173
|
|
ADMIN_API_KEY: ci-test-admin-key
|
|
GDRIVE_CLIENT_ID: placeholder
|
|
GDRIVE_CLIENT_SECRET: placeholder
|
|
GDRIVE_REFRESH_TOKEN: placeholder
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
|
|
frontend:
|
|
name: Frontend — lint / test / build
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: cshare-app
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
cache: npm
|
|
cache-dependency-path: cshare-app/package-lock.json
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
- name: Run tests
|
|
run: npm test
|
|
|
|
- name: Build
|
|
run: npm run build
|
|
env:
|
|
VITE_API_BASE_URL: https://file.asabbagh.com
|