- Bump version to 0.5.0-beta - Add Apache-2.0 LICENSE (official text) + NOTICE - Add Docker support: multi-stage Dockerfile + docker-compose * non-root user, tini PID 1, gunicorn + uvicorn workers * healthcheck, OCI labels, persistent /data volume - Add GitHub Actions CI (lint/import-check + Docker smoke-test) - Backend polish: * modern lifespan handler (replaces deprecated on_event) * explicit sort validation (400 instead of 500) * title min_length=1 schema validation * configurable data dir + http timeout via env * avg_rating helper extracted (DRY) - Frontend polish: * beta badge in title, footer with live version * loading spinner on initial fetch * updated README, badges, config table, roadmap
40 lines
976 B
YAML
40 lines
976 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
cache: pip
|
|
- run: pip install -r requirements.txt
|
|
- name: Backend-Import-Check
|
|
run: |
|
|
python -c "from app.main import app; print('OK', app.title, app.version)"
|
|
- name: Frontend-Asset-Check
|
|
run: |
|
|
test -f app/static/index.html
|
|
test -f app/static/css/style.css
|
|
test -f app/static/js/app.js
|
|
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Docker-Build
|
|
run: docker build -t watchstack:ci .
|
|
- name: Smoke-Test
|
|
run: |
|
|
docker run -d --rm --name ws -p 8765:8000 watchstack:ci
|
|
sleep 4
|
|
curl -fsS http://127.0.0.1:8765/api/health
|
|
docker stop ws
|