mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
* added turborepo * finished turbo migration * updated gitignore * use dotenv & run format * fixed error in docs * remove standalone deployment in prod * fix ts error, remove ignore ts errors during build * added formatter to the end of the docs generator
77 lines
1.8 KiB
YAML
77 lines
1.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
test:
|
|
name: Test and Build
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
cache-dependency-path: './package-lock.json'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Install Turbo globally
|
|
run: npm install -g turbo
|
|
|
|
- name: Run tests with coverage
|
|
env:
|
|
NODE_OPTIONS: '--no-warnings'
|
|
run: npx turbo run test
|
|
|
|
- name: Build application
|
|
env:
|
|
NODE_OPTIONS: '--no-warnings'
|
|
NEXT_PUBLIC_APP_URL: 'https://www.simstudio.ai'
|
|
STRIPE_SECRET_KEY: 'dummy_key_for_ci_only'
|
|
STRIPE_WEBHOOK_SECRET: 'dummy_secret_for_ci_only'
|
|
RESEND_API_KEY: 'dummy_key_for_ci_only'
|
|
AWS_REGION: 'us-west-2'
|
|
run: npx turbo run build
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
directory: ./apps/sim/coverage
|
|
fail_ci_if_error: false
|
|
verbose: true
|
|
|
|
migrations:
|
|
name: Apply Database Migrations
|
|
runs-on: ubuntu-latest
|
|
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
|
needs: test
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
cache: 'npm'
|
|
cache-dependency-path: './package-lock.json'
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Apply migrations
|
|
working-directory: ./apps/sim
|
|
env:
|
|
DATABASE_URL: ${{ secrets.DATABASE_URL }}
|
|
run: npx drizzle-kit push
|