Skip to content

Delete logic fix

Delete logic fix #262

Workflow file for this run

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