Add performance tests #2
Workflow file for this run
This file contains 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: Performance Test | |
on: | |
push: | |
branches: | |
- 'master' | |
pull_request: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: "3.22.0" | |
cache: true | |
# Manually Update this `key` | |
cache-key: "20230512" | |
- run: | | |
cd packages/fleather/example | |
ls | |
- name: Restore reference summary from cache | |
id: performance_timelines_cache_restore | |
uses: actions/cache/restore@v4 | |
with: | |
path: build/performance_timelines | |
key: performance_timelines | |
- if: steps.performance_timelines_cache_restore.outputs.cache-hit == 'true' | |
run: mv performance_timelines reference_performance_timelines | |
- name: Run performance tests | |
run: | | |
ls | |
flutter drive --driver=test_driver/performance_driver.dart --target=integration_test/scrolling_test.dart --profile | |
flutter drive --driver=test_driver/performance_driver.dart --target=integration_test/editing_test.dart --profile | |
dart run test_utils/analyze_performance_result.dart | |
- name: Save reference summary | |
if: github.ref == 'refs/heads/master' | |
uses: actions/cache/save@v4 | |
with: | |
path: build/performance_timelines | |
key: performance_timelines |