feat: unify on single repo-root compose file for dev and prod
This commit is contained in:
parent
9acdbaa453
commit
af993bd43f
18 changed files with 253 additions and 229 deletions
22
.forgejo/workflows/backend.yml
Normal file
22
.forgejo/workflows/backend.yml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Backend test suite. Runs the full pytest suite on a throwaway SQLite file.
|
||||
# Prerequisites on the Forgejo instance (not verifiable from the repo):
|
||||
# - a Runner with the `docker` label online (repo Settings -> Actions -> Runners)
|
||||
# - action resolution for actions/checkout (github proxy or code.forgejo.org mirror)
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
paths:
|
||||
- "backend/**"
|
||||
- "docker-compose.yml"
|
||||
- ".forgejo/workflows/backend.yml"
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: ghcr.io/astral-sh/uv:python3.12-bookworm
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: cd backend && uv sync
|
||||
- run: cd backend && uv run pytest
|
||||
20
.forgejo/workflows/frontend.yml
Normal file
20
.forgejo/workflows/frontend.yml
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
# Frontend typecheck + build. Same prerequisites as backend.yml (Runner
|
||||
# with the `docker` label, action resolution on the Forgejo instance).
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
paths:
|
||||
- "frontend/**"
|
||||
- "docker-compose.yml"
|
||||
- ".forgejo/workflows/frontend.yml"
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: node:22-slim
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: cd frontend && npm ci
|
||||
- run: cd frontend && npm run build
|
||||
22
.forgejo/workflows/infra.yml
Normal file
22
.forgejo/workflows/infra.yml
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# Validates the single compose file parses (needs only the CLI, no daemon).
|
||||
# Same Runner prerequisites as backend.yml.
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
paths:
|
||||
- "docker-compose.yml"
|
||||
- ".env.example"
|
||||
- "backend/Dockerfile"
|
||||
- "frontend/Dockerfile"
|
||||
- "Dockerfile.lfx"
|
||||
- ".forgejo/workflows/infra.yml"
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: docker:24
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- run: docker compose -f docker-compose.yml config --quiet
|
||||
Loading…
Add table
Add a link
Reference in a new issue