Skip to content

Commit

Permalink
feat: added integration test reports creation and commit to repo afte…
Browse files Browse the repository at this point in the history
…r test execution
  • Loading branch information
limcheekin committed Oct 20, 2023
1 parent 1838c8c commit 129e3ab
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/browser-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,12 @@ jobs:
- name: Run browser tests
run: flutter drive --driver=test_driver/integration_test.dart --target integration_test/app_test.dart -d web-server --release --browser-name=chrome

- name: Git Commit Integration Test Reports
if: github.event_name == 'push'
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "[email protected]"
git add integration_test/reports
git commit -m "chore: added integration test reports"
git push
11 changes: 9 additions & 2 deletions test_driver/integration_test.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
import 'package:integration_test/integration_test_driver.dart';
import 'package:integration_test/integration_test_driver.dart'
as integration_test_driver;

Future<void> main() => integrationDriver();
Future<void> main() async {
/// Repports are generated on given path, once all tested passed,
integration_test_driver.testOutputsDirectory = 'integration_test/reports';
await integration_test_driver.integrationDriver(
timeout: const Duration(minutes: 3),
);
}

0 comments on commit 129e3ab

Please sign in to comment.