π CI / CD β
KitchenAsty uses GitHub Actions for continuous integration. The pipeline is defined in .github/workflows/ci.yml.
πΊοΈ Pipeline Overview β
ββββββββ ββββββββββββββ ββββββββββββββββββββ βββββββββββ
β Lint β β Unit Tests β β Integration Tests β β Audit β
ββββ¬ββββ βββββββ¬βββββββ ββββββββββ¬ββββββββββ βββββββββββ
β β β
βββββββββββββββ΄βββββββββββββββββββββ
β
βββββ΄ββββ ββββββββββββ
β Build β β E2E Testsβ
βββββββββ ββββββββββββπ Jobs β
π§Ή Lint β
- Installs dependencies
- Generates Prisma client
- Runs TypeScript type checking on all packages (
shared,server,admin,storefront)
π§ͺ Unit Tests β
- Runs shared package tests with Vitest
- Runs server unit tests (
src/__tests__/unit)
π Integration Tests β
- Runs server integration tests (
src/__tests__/integration)
π E2E Tests β
- Starts a PostgreSQL service container
- Pushes schema and seeds the database
- Installs Playwright + Chromium
- Runs Playwright E2E tests
- Uploads test results as an artifact
π Security Audit β
- Runs
npm auditat high severity level - Non-blocking (uses
|| true)
ποΈ Build β
- Depends on: Lint, Unit Tests, Integration Tests
- Builds all packages in order: shared β server β admin β storefront
- Uploads admin and storefront builds as artifacts
π Adding Auto-Deploy β
To extend the pipeline for automatic deployment, add a deploy job after build:
yaml
deploy:
name: Deploy
runs-on: ubuntu-latest
needs: [build]
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/download-artifact@v4
with:
name: admin-dist
path: admin-dist/
- uses: actions/download-artifact@v4
with:
name: storefront-dist
path: storefront-dist/
# Add your deployment steps here:
# - SSH to server and copy files
# - Push to container registry and restart
# - Deploy to cloud platformπ Environment Variables for CI β
The E2E job uses these environment variables:
| Variable | Value |
|---|---|
DATABASE_URL | Points to the CI PostgreSQL service |
JWT_SECRET | test-secret |
CORS_ORIGINS | http://localhost:5173,http://localhost:5174 |
CI | true |