name: ci on: push: branches: [main] pull_request: jobs: backend: runs-on: ubuntu-latest services: postgres: image: postgres:17-alpine env: POSTGRES_USER: postgres POSTGRES_PASSWORD: postgres POSTGRES_DB: postgres ports: ["5432:5432"] options: >- --health-cmd "pg_isready -U postgres" --health-interval 5s --health-timeout 3s --health-retries 20 defaults: run: working-directory: backend steps: - uses: actions/checkout@v4 - uses: astral-sh/setup-uv@v5 with: enable-cache: true - run: uv python install 3.12 - run: uv sync --frozen - run: uv run ruff check . - run: uv run ruff format --check . - run: uv run pyright - name: tests run: uv run pytest -q env: # tests spawn their own postgres via pg_ctl; the client tools come from the OS package PATH: /usr/lib/postgresql/17/bin:${{ env.PATH }} - name: openapi drift run: | uv run fintracker openapi /tmp/openapi.json diff -u ../openapi/openapi.json /tmp/openapi.json backend-image: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: docker/setup-buildx-action@v3 # build only (no push): a broken Dockerfile should fail here, not on the VPS - uses: docker/build-push-action@v6 with: context: backend push: false cache-from: type=gha cache-to: type=gha,mode=max app: runs-on: ubuntu-latest defaults: run: working-directory: app steps: - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2 with: flutter-version: "3.47.4" channel: stable - run: flutter pub get - run: flutter analyze - run: flutter test app-build-linux: runs-on: ubuntu-latest defaults: run: working-directory: app steps: - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2 with: flutter-version: "3.47.4" channel: stable - name: install Linux desktop build dependencies run: | sudo apt-get update sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev libsecret-1-dev - run: flutter pub get - run: flutter build linux --release app-build-windows: runs-on: windows-latest defaults: run: working-directory: app steps: - uses: actions/checkout@v4 - uses: subosito/flutter-action@v2 with: flutter-version: "3.47.4" channel: stable - run: flutter pub get - run: flutter build windows --release