name: CI on: push: branches: [main] pull_request: branches: [main] # Allow builds to find SQLite / Flutter artifacts behind a corporate proxy. # Configure repo/org secrets HTTP_PROXY / HTTPS_PROXY in Gitea if needed. env: FLUTTER_VERSION: "3.41.4" jobs: analyze: name: Analyze (Flutter) runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Flutter uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} channel: stable cache: true - name: Install dependencies run: flutter pub get - name: Verify formatting run: dart format --output=none --set-exit-if-changed lib test - name: Static analysis run: flutter analyze test: name: Test (Flutter, Linux) runs-on: ubuntu-latest needs: analyze steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Flutter uses: subosito/flutter-action@v2 with: flutter-version: ${{ env.FLUTTER_VERSION }} channel: stable cache: true # The sqlite3 Dart package downloads a precompiled binary from GitHub # releases when building native assets. On Linux CI we instead link the # system libsqlite3 to avoid the download (faster + works offline). # This override is applied only in CI; the committed pubspec.yaml stays # clean so the Windows build downloads the bundled sqlite3.dll normally. - name: Install system SQLite run: sudo apt-get update && sudo apt-get install -y libsqlite3-dev - name: Use system SQLite for native assets (CI only) run: | cat >> pubspec.yaml <<'EOF' hooks: user_defines: sqlite3: source: system EOF - name: Install dependencies run: flutter pub get - name: Run tests run: flutter test --reporter expanded server: name: Test (Server, optional) runs-on: ubuntu-latest # The server is an optional/experimental backend. Keep it from blocking # the pipeline, but still surface failures. continue-on-error: true steps: - name: Checkout uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v5 with: python-version: "3.12" cache: pip - name: Install dependencies working-directory: server run: | python -m pip install --upgrade pip pip install -r requirements.txt - name: Run tests working-directory: server run: pytest -q