perf: cut integration-ui test time from 250s to 28s
- Fix HOME override that caused FVM to re-download 220MB Flutter SDK on every run; use XDG_DATA_HOME instead to isolate app data without touching HOME - Switch DB path from getApplicationDocumentsDirectory() to getApplicationSupportDirectory() so XDG_DATA_HOME isolation works and stale accounts don't leak between test runs - Replace fixed pump(5s/3s) waits with pumpUntil() polling at 200ms so tests stop waiting as soon as the UI is ready (23s of dead wait → 8s) - Add timing instrumentation (ts() in shell, _log()/Stopwatch in Dart) - Fix CI integration-ui job: was mixing subosito flutter with fvm flutter; now uses fvm consistently with actions/cache for ~/.fvm, ~/.pub-cache, and build/linux Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
c7a121e386
commit
33d1e21bc9
+37
-12
@@ -47,17 +47,25 @@ jobs:
|
||||
|
||||
- uses: DeterminateSystems/magic-nix-cache-action@v8
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
- name: Cache FVM Flutter SDK
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
flutter-version: "3.41.6"
|
||||
channel: stable
|
||||
cache: true
|
||||
path: ~/.fvm
|
||||
key: fvm-${{ hashFiles('.fvm/fvm_config.json') }}
|
||||
|
||||
- name: Cache pub packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.pub-cache
|
||||
key: pub-${{ hashFiles('pubspec.lock') }}
|
||||
restore-keys: pub-
|
||||
|
||||
- name: Run integration tests
|
||||
run: |
|
||||
nix develop --command bash -c "
|
||||
flutter pub get &&
|
||||
flutter pub run build_runner build --delete-conflicting-outputs &&
|
||||
fvm install --skip-pub-get &&
|
||||
fvm flutter pub get &&
|
||||
fvm flutter pub run build_runner build --delete-conflicting-outputs &&
|
||||
stalwart-dev/test.sh
|
||||
"
|
||||
|
||||
@@ -80,17 +88,34 @@ jobs:
|
||||
libgtk-3-dev pkg-config cmake ninja-build clang \
|
||||
libsecret-1-dev
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
- name: Cache FVM Flutter SDK
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
flutter-version: "3.41.6"
|
||||
channel: stable
|
||||
cache: true
|
||||
path: ~/.fvm
|
||||
key: fvm-${{ hashFiles('.fvm/fvm_config.json') }}
|
||||
|
||||
- name: Cache pub packages
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.pub-cache
|
||||
key: pub-${{ hashFiles('pubspec.lock') }}
|
||||
restore-keys: pub-
|
||||
|
||||
- name: Cache Linux debug build
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
build/linux
|
||||
.dart_tool/flutter_build
|
||||
key: linux-debug-${{ hashFiles('pubspec.lock', 'lib/**/*.dart', 'integration_test/**/*.dart') }}
|
||||
restore-keys: linux-debug-
|
||||
|
||||
- name: Run UI integration tests
|
||||
run: |
|
||||
nix develop --command bash -c "
|
||||
flutter pub get &&
|
||||
flutter pub run build_runner build --delete-conflicting-outputs &&
|
||||
fvm install --skip-pub-get &&
|
||||
fvm flutter pub get &&
|
||||
fvm flutter pub run build_runner build --delete-conflicting-outputs &&
|
||||
stalwart-dev/integration_ui_test.sh
|
||||
"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user