Delete logic fix #262
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: π CI | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| push: | |
| branches: | |
| - main | |
| env: | |
| DATABASE_URL: postgres://postgres:postgres@localhost:5432/programmerbar | |
| REDIS_URL: redis://localhost:6379 | |
| S3_BUCKET: test-bucket | |
| FEIDE_CLIENT_ID: test | |
| FEIDE_CLIENT_SECRET: test | |
| FEIDE_REDIRECT_URI: http://localhost:8000/auth/feide/callback | |
| ADMIN_KEY: test-admin-key | |
| jobs: | |
| ci: | |
| name: π Run CI | |
| runs-on: ubuntu-latest | |
| services: | |
| postgres: | |
| image: postgres:15 | |
| env: | |
| POSTGRES_USER: postgres | |
| POSTGRES_PASSWORD: postgres | |
| POSTGRES_DB: programmerbar | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:7-alpine | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - name: π Checkout | |
| uses: actions/checkout@v4 | |
| - name: π¦ Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: π’ Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: pnpm | |
| cache-dependency-path: ./pnpm-lock.yaml | |
| - name: π¦ Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: πΏοΈ Install sqlx | |
| run: cargo install sqlx-cli | |
| - name: ποΈ Run database migrations | |
| run: pnpm --filter=api run-migrations --database-url postgres://postgres:postgres@localhost:5432/programmerbar | |
| - name: π Prepare SQLx offline cache | |
| run: | | |
| cd apps/api | |
| cargo sqlx prepare --database-url postgres://postgres:postgres@localhost:5432/programmerbar | |
| - name: π΅ Check | |
| run: pnpm check | |
| - name: π¦ Lint | |
| run: pnpm lint | |
| - name: β‘ Format check | |
| run: pnpm format:check | |
| - name: π Build | |
| run: pnpm build |