chore: initialize monorepo (Rust backend + Next.js frontend) #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Backend CI | |
| on: | |
| push: | |
| branches: [main, develop] | |
| paths: | |
| - "backend/**" | |
| - ".github/workflows/backend-ci.yml" | |
| pull_request: | |
| branches: [main, develop] | |
| paths: | |
| - "backend/**" | |
| - ".github/workflows/backend-ci.yml" | |
| env: | |
| CARGO_TERM_COLOR: always | |
| DATABASE_URL: postgres://postgres:password@localhost:5432/coupang_review_ai | |
| JWT_SECRET: ci-test-secret-key | |
| JWT_EXPIRES_IN: 86400 | |
| SERVER_PORT: 8080 | |
| defaults: | |
| run: | |
| working-directory: backend | |
| jobs: | |
| test: | |
| name: Check, Lint & Test | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:16 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: password | |
| POSTGRES_DB: coupang_review_ai | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust stable toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: clippy, rustfmt | |
| - name: Cache cargo registry and build artifacts | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: backend | |
| - name: cargo check | |
| run: cargo check --all-targets | |
| - name: cargo fmt --check | |
| run: cargo fmt --check | |
| - name: cargo clippy | |
| run: cargo clippy --all-targets -- -D warnings | |
| - name: cargo test | |
| run: cargo test --all-targets |