fix(ci): add MySQL and Redis services for OpenAPI generation
The NestJS app requires database and Redis connections to bootstrap. Added GitHub Actions services for MySQL and Redis with necessary environment variables for the openapi:export command to work. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,12 +16,80 @@ defaults:
|
||||
run:
|
||||
shell: 'bash'
|
||||
|
||||
env:
|
||||
# Database configuration
|
||||
DB_HOST: 127.0.0.1
|
||||
DB_USER: root
|
||||
DB_PASSWORD: root
|
||||
DB_CHARSET: utf8
|
||||
SYSTEM_DB_NAME: bigcapital_system
|
||||
TENANT_DB_NAME_PERFIX: bigcapital_tenant_
|
||||
# Redis configuration
|
||||
REDIS_HOST: 127.0.0.1
|
||||
REDIS_PORT: 6379
|
||||
# Queue configuration
|
||||
QUEUE_HOST: 127.0.0.1
|
||||
QUEUE_PORT: 6379
|
||||
# App configuration
|
||||
APP_JWT_SECRET: test-jwt-secret-for-openapi-generation
|
||||
JWT_SECRET: test-jwt-secret-for-openapi-generation
|
||||
BASE_URL: http://localhost:3000
|
||||
# Feature flags
|
||||
SIGNUP_DISABLED: 'false'
|
||||
SIGNUP_EMAIL_CONFIRMATION: 'false'
|
||||
API_RATE_LIMIT: 120,60,600
|
||||
# Optional services (empty for OpenAPI generation)
|
||||
MAIL_HOST: ''
|
||||
MAIL_PORT: ''
|
||||
MAIL_USERNAME: ''
|
||||
MAIL_PASSWORD: ''
|
||||
MAIL_FROM_NAME: ''
|
||||
MAIL_FROM_ADDRESS: ''
|
||||
GOTENBERG_URL: ''
|
||||
GOTENBERG_DOCS_URL: ''
|
||||
PLAID_CLIENT_ID: ''
|
||||
PLAID_SECRET: ''
|
||||
LEMONSQUEEZY_API_KEY: ''
|
||||
S3_ACCESS_KEY_ID: ''
|
||||
S3_SECRET_ACCESS_KEY: ''
|
||||
S3_BUCKET: ''
|
||||
POSTHOG_API_KEY: ''
|
||||
STRIPE_PAYMENT_SECRET_KEY: ''
|
||||
OPEN_EXCHANGE_RATE_APP_ID: ''
|
||||
BULLBOARD_ENABLED: 'false'
|
||||
BULLBOARD_USERNAME: ''
|
||||
BULLBOARD_PASSWORD: ''
|
||||
|
||||
jobs:
|
||||
generate-openapi:
|
||||
name: Generate OpenAPI and SDK Types
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 15
|
||||
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:8.0
|
||||
env:
|
||||
MYSQL_ROOT_PASSWORD: root
|
||||
MYSQL_DATABASE: bigcapital_system
|
||||
ports:
|
||||
- 3306:3306
|
||||
options: >-
|
||||
--health-cmd="mysqladmin ping --silent"
|
||||
--health-interval=10s
|
||||
--health-timeout=5s
|
||||
--health-retries=10
|
||||
|
||||
redis:
|
||||
image: redis:7-alpine
|
||||
ports:
|
||||
- 6379:6379
|
||||
options: >-
|
||||
--health-cmd="redis-cli ping"
|
||||
--health-interval=10s
|
||||
--health-timeout=5s
|
||||
--health-retries=10
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
Reference in New Issue
Block a user