Phase 0 foundation for Docwell, an open-source knowledge base: - Database: PocketBase v0.40.6 with initial schema migrations; users is the built-in auth collection, plus a hook for token checks and env-driven app URL/SMTP settings - Server: Go API (health, version, auth endpoints forwarded to PocketBase, admin user list) with an embedded Vue admin panel - Web-App: Go static server and Vue/Tailwind app with Tiptap editor, sign-in, sign-up, password reset and email verification (EN/PL) - Desktop-App: Wails v3 host reusing the web app - Phone-App: Flutter app with sign-in - Shared packages (editor, ui, api-client), OpenAPI spec, Docker compose (separate services and all-in-one), GitHub Actions CI - Docs: feature inventory and architecture/build plan Licensed under AGPL-3.0-or-later. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
98 lines
2.4 KiB
YAML
98 lines
2.4 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
go:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
module: [Server, Web-App]
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: actions/setup-go@v6
|
|
with:
|
|
go-version: "1.26"
|
|
- name: Vet and test
|
|
working-directory: ${{ matrix.module }}
|
|
env:
|
|
GOWORK: "off"
|
|
run: |
|
|
test -z "$(gofmt -l .)" || (gofmt -l . && exit 1)
|
|
go vet ./...
|
|
go test -race ./...
|
|
|
|
frontend:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: actions/setup-node@v5
|
|
with:
|
|
node-version: 24
|
|
cache: npm
|
|
- run: npm ci
|
|
- name: API types are up to date
|
|
run: |
|
|
npm run generate -w @docwell/api-client
|
|
git diff --exit-code Packages/api-client/src/schema.d.ts
|
|
- run: npm run typecheck
|
|
- run: npm test
|
|
- run: npm run build
|
|
|
|
desktop:
|
|
strategy:
|
|
matrix:
|
|
os: [windows-latest, macos-latest, ubuntu-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: actions/setup-go@v6
|
|
with:
|
|
go-version: "1.26"
|
|
- uses: actions/setup-node@v5
|
|
with:
|
|
node-version: 24
|
|
cache: npm
|
|
- name: Linux webview dependencies
|
|
if: runner.os == 'Linux'
|
|
run: sudo apt-get update && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev
|
|
- run: npm ci
|
|
- run: npm run build -w @docwell/desktop
|
|
- name: Test and build
|
|
working-directory: Desktop-App
|
|
env:
|
|
GOWORK: "off"
|
|
run: |
|
|
go test ./...
|
|
go build -o bin/ .
|
|
|
|
mobile:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: Phone-App
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: subosito/flutter-action@v2
|
|
with:
|
|
channel: stable
|
|
- run: flutter pub get
|
|
- run: flutter analyze
|
|
- run: flutter test
|
|
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- name: Build and smoke-test the compose stack
|
|
working-directory: Docker
|
|
run: |
|
|
cp .env.example .env
|
|
docker compose up --build -d --wait
|
|
curl -fsS http://localhost:8080/readyz
|
|
curl -fsS http://localhost:3000/ | grep -q '<div id="app">'
|
|
docker compose down -v
|