fix(ci): generate stub files before flutter analyze
CI / Lint (pull_request) Canceled after 16m4s
CI / Test (pull_request) Canceled after 0s
CI / Build Android (pull_request) Canceled after 0s
CI / Build iOS (pull_request) Canceled after 0s

The generated/ directory (app_config.dart, theme_colors.dart) is created
by build_whitelabel.py from theme.json. Since theme.json is not in the
repo, the lint gate fails on missing generated imports.

Added ci_stub_gen.py to produce minimal stubs so flutter analyze passes
before the whitelabel build step. Wired into all jobs in ci.yml and
release.yml.
This commit is contained in:
robot
2026-08-01 06:52:09 +00:00
parent 7f060f381a
commit 7b04b2f9cd
3 changed files with 120 additions and 1 deletions
+11 -1
View File
@@ -36,6 +36,10 @@ jobs:
- name: Install dependencies
run: flutter pub get
- name: Generate stubs (lint gate support)
if: hashFiles('theme.json') == ''
run: python3 ci_stub_gen.py
- name: Analyze Dart code
run: flutter analyze --fatal-warnings
@@ -61,6 +65,9 @@ jobs:
- name: Install dependencies
run: flutter pub get
- name: Generate stubs (lint gate support)
run: python3 ci_stub_gen.py
- name: Run tests
run: flutter test --reporter=expanded
@@ -116,9 +123,12 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Install Flutter dependencies
- name: Install dependencies
run: flutter pub get
- name: Generate stubs (lint gate support)
run: python3 ci_stub_gen.py
- name: Analyze (gate before build)
run: flutter analyze --fatal-warnings