docs: add production-readiness PR checklist (#144) #443
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [ master, main ] | |
| pull_request: | |
| branches: [ master, main ] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| analyze: | |
| name: Analyze & Lint | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| cache: true | |
| - name: Install dependencies | |
| run: | | |
| flutter pub get | |
| (cd example/basic_app && flutter pub get) | |
| (cd example/chat_app && flutter pub get) | |
| (cd example/llamadart_cli && dart pub get) | |
| (cd example/llamadart_server && dart pub get) | |
| (cd example/tui_coding_agent && dart pub get) | |
| - name: Verify formatting | |
| run: dart format --output=none --set-exit-if-changed . | |
| - name: Analyze project source | |
| run: dart analyze | |
| - name: Check platform boundaries | |
| run: dart run tool/testing/check_platform_boundaries.dart | |
| - name: Pub Publish Dry Run | |
| run: flutter pub publish --dry-run | |
| - name: Install Pana | |
| run: flutter pub global activate pana | |
| - name: Check Pana Score | |
| run: flutter pub global run pana . --exit-code-threshold 160 | |
| docs-check: | |
| name: Docs Build Check | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 25 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| cache: true | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Install dependencies | |
| run: | | |
| flutter pub get | |
| (cd website && npm ci) | |
| - name: Build documentation site | |
| run: ./tool/docs/build_site.sh | |
| test-linux-coverage: | |
| name: Test Linux & Web (with Coverage) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 45 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| cache: true | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Install Coverage tool | |
| run: dart pub global activate coverage | |
| - name: Run VM tests (with coverage) | |
| run: dart test -p vm -j 1 --exclude-tags local-only --coverage=coverage | |
| - name: Run Browser tests | |
| run: dart test -p chrome --exclude-tags local-only | |
| - name: Format coverage | |
| run: | | |
| dart pub global run coverage:format_coverage --lcov --in=coverage/test --out=coverage/lcov.info --report-on=lib --check-ignore | |
| dart run tool/testing/check_lcov_threshold.dart coverage/lcov.info 70 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| files: coverage/lcov.info | |
| flags: unittests | |
| name: codecov-umbrella | |
| fail_ci_if_error: true | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| test-other-os: | |
| name: Test Native (${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| timeout-minutes: 45 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, windows-latest] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| cache: true | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Run native tests | |
| env: | |
| GGML_METAL_DEVICES: "0" | |
| run: dart test -p vm -j 1 --exclude-tags local-only | |
| native-prompt-reuse-parity: | |
| name: Native Prompt Reuse Parity | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 35 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| cache: true | |
| - name: Install dependencies | |
| run: flutter pub get | |
| - name: Download parity model | |
| run: | | |
| mkdir -p "$RUNNER_TEMP/models" | |
| curl --retry 5 --retry-all-errors --retry-delay 3 --location \ | |
| "https://huggingface.co/Qwen/Qwen2.5-0.5B-Instruct-GGUF/resolve/main/qwen2.5-0.5b-instruct-q4_k_m.gguf?download=true" \ | |
| --output "$RUNNER_TEMP/models/qwen2.5-0.5b-instruct-q4_k_m.gguf" | |
| - name: Run native prompt reuse parity | |
| run: | | |
| dart run tool/testing/native_prompt_reuse_parity.dart \ | |
| --model "$RUNNER_TEMP/models/qwen2.5-0.5b-instruct-q4_k_m.gguf" \ | |
| --prompt-file "tool/testing/prompts/native_prompt_reuse_ci_prompts.txt" \ | |
| --max-prompts 4 \ | |
| --runs 1 \ | |
| --max-tokens 64 \ | |
| --gpu-layers 0 \ | |
| --threads 1 \ | |
| --threads-batch 1 \ | |
| --temp 0 \ | |
| --top-k 1 \ | |
| --top-p 1.0 \ | |
| --min-p 0.0 \ | |
| --repeat-penalty 1.0 \ | |
| --fail-on-mismatch |