Skip to content

rapid_cli_e2e

rapid_cli_e2e #255

name: rapid_cli_e2e
on:
workflow_dispatch:
push:
branches:
- main
env:
FLUTTER_VERSION: 3.13.0
FIXTURES_PATH: packages/rapid_cli/test/e2e/fixtures
jobs:
generate-fixtures:
runs-on: ubuntu-latest
defaults:
run:
working-directory: packages/rapid_cli
steps:
- uses: actions/checkout@v4
- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:"
- name: Setup Melos
run: flutter pub global activate melos
- name: Setup Mason CLI
run: dart pub global activate mason_cli
- name: Setup Rapid CLI
run: melos dev:activate
- name: Cache Fixtures
uses: actions/cache@v3
with:
path: ${{ env.FIXTURES_PATH }}
key: fixtures-${{ github.run_id }}
- name: Generate Fixtures
run: bash ../../tool/fixtures.sh
e2e:
runs-on: ubuntu-latest
needs: generate-fixtures
defaults:
run:
working-directory: packages/rapid_cli
strategy:
fail-fast: false
matrix:
test:
# E2E tests for activate command
- test/e2e/activate_android_test.dart
- test/e2e/activate_ios_test.dart
- test/e2e/activate_linux_test.dart
- test/e2e/activate_macos_test.dart
- test/e2e/activate_web_test.dart
- test/e2e/activate_windows_test.dart
# E2E tests for create command
- test/e2e/create_test.dart
# E2E tests for deactivate command
- test/e2e/deactivate_android_test.dart
- test/e2e/deactivate_ios_test.dart
- test/e2e/deactivate_linux_test.dart
- test/e2e/deactivate_macos_test.dart
- test/e2e/deactivate_web_test.dart
- test/e2e/deactivate_windows_test.dart
# E2E tests for domain command
- test/e2e/domain_sub_domain_add_entity_test.dart
- test/e2e/domain_sub_domain_add_service_interface_test.dart
- test/e2e/domain_sub_domain_add_value_object_test.dart
- test/e2e/domain_sub_domain_remove_entity_test.dart
- test/e2e/domain_sub_domain_remove_service_interface_test.dart
- test/e2e/domain_sub_domain_remove_value_object_test.dart
# E2E tests for infrastructure command
- test/e2e/infrastructure_sub_infrastructure_add_data_transfer_object_test.dart
- test/e2e/infrastructure_sub_infrastructure_add_service_implementation_test.dart
- test/e2e/infrastructure_sub_infrastructure_remove_data_transfer_object_test.dart
- test/e2e/infrastructure_sub_infrastructure_remove_service_implementation_test.dart
# E2E tests for ui command
- test/e2e/ui_add_widget_test.dart
- test/e2e/ui_android_add_widget_test.dart
- test/e2e/ui_android_remove_widget_test.dart
- test/e2e/ui_ios_add_widget_test.dart
- test/e2e/ui_ios_remove_widget_test.dart
- test/e2e/ui_linux_add_widget_test.dart
- test/e2e/ui_linux_remove_widget_test.dart
- test/e2e/ui_macos_add_widget_test.dart
- test/e2e/ui_macos_remove_widget_test.dart
- test/e2e/ui_mobile_add_widget_test.dart
- test/e2e/ui_mobile_remove_widget_test.dart
- test/e2e/ui_remove_widget_test.dart
- test/e2e/ui_web_add_widget_test.dart
- test/e2e/ui_web_remove_widget_test.dart
- test/e2e/ui_windows_add_widget_test.dart
- test/e2e/ui_windows_remove_widget_test.dart
# E2E tests for <platform> command
- test/e2e/android_add_feature_flow_test.dart
- test/e2e/android_add_feature_page_test.dart
- test/e2e/android_add_feature_tab_flow_test.dart
- test/e2e/android_add_feature_widget_test.dart
- test/e2e/android_add_language_test.dart
- test/e2e/android_add_navigator_test.dart
- test/e2e/android_feature_add_bloc_test.dart
- test/e2e/android_feature_add_cubit_test.dart
- test/e2e/android_remove_feature_test.dart
- test/e2e/android_remove_language_test.dart
- test/e2e/android_remove_navigator_test.dart
- test/e2e/ios_add_feature_flow_test.dart
- test/e2e/ios_add_feature_page_test.dart
- test/e2e/ios_add_feature_tab_flow_test.dart
- test/e2e/ios_add_feature_widget_test.dart
- test/e2e/ios_add_language_test.dart
- test/e2e/ios_add_navigator_test.dart
- test/e2e/ios_feature_add_bloc_test.dart
- test/e2e/ios_feature_add_cubit_test.dart
- test/e2e/ios_remove_feature_test.dart
- test/e2e/ios_remove_language_test.dart
- test/e2e/ios_remove_navigator_test.dart
- test/e2e/linux_add_feature_flow_test.dart
- test/e2e/linux_add_feature_page_test.dart
- test/e2e/linux_add_feature_tab_flow_test.dart
- test/e2e/linux_add_feature_widget_test.dart
- test/e2e/linux_add_language_test.dart
- test/e2e/linux_add_navigator_test.dart
- test/e2e/linux_feature_add_bloc_test.dart
- test/e2e/linux_feature_add_cubit_test.dart
- test/e2e/linux_remove_feature_test.dart
- test/e2e/linux_remove_language_test.dart
- test/e2e/linux_remove_navigator_test.dart
- test/e2e/macos_add_feature_flow_test.dart
- test/e2e/macos_add_feature_page_test.dart
- test/e2e/macos_add_feature_tab_flow_test.dart
- test/e2e/macos_add_feature_widget_test.dart
- test/e2e/macos_add_language_test.dart
- test/e2e/macos_add_navigator_test.dart
- test/e2e/macos_feature_add_bloc_test.dart
- test/e2e/macos_feature_add_cubit_test.dart
- test/e2e/macos_remove_feature_test.dart
- test/e2e/macos_remove_language_test.dart
- test/e2e/macos_remove_navigator_test.dart
- test/e2e/mobile_add_feature_flow_test.dart
- test/e2e/mobile_add_feature_page_test.dart
- test/e2e/mobile_add_feature_tab_flow_test.dart
- test/e2e/mobile_add_feature_widget_test.dart
- test/e2e/mobile_add_language_test.dart
- test/e2e/mobile_add_navigator_test.dart
- test/e2e/mobile_feature_add_bloc_test.dart
- test/e2e/mobile_feature_add_cubit_test.dart
- test/e2e/mobile_remove_feature_test.dart
- test/e2e/mobile_remove_language_test.dart
- test/e2e/mobile_remove_navigator_test.dart
- test/e2e/web_add_feature_flow_test.dart
- test/e2e/web_add_feature_page_test.dart
- test/e2e/web_add_feature_tab_flow_test.dart
- test/e2e/web_add_feature_widget_test.dart
- test/e2e/web_add_language_test.dart
- test/e2e/web_add_navigator_test.dart
- test/e2e/web_feature_add_bloc_test.dart
- test/e2e/web_feature_add_cubit_test.dart
- test/e2e/web_remove_feature_test.dart
- test/e2e/web_remove_language_test.dart
- test/e2e/web_remove_navigator_test.dart
- test/e2e/windows_add_feature_flow_test.dart
- test/e2e/windows_add_feature_page_test.dart
- test/e2e/windows_add_feature_tab_flow_test.dart
- test/e2e/windows_add_feature_widget_test.dart
- test/e2e/windows_add_language_test.dart
- test/e2e/windows_add_navigator_test.dart
- test/e2e/windows_feature_add_bloc_test.dart
- test/e2e/windows_feature_add_cubit_test.dart
- test/e2e/windows_remove_feature_test.dart
- test/e2e/windows_remove_language_test.dart
- test/e2e/windows_remove_navigator_test.dart
steps:
- uses: actions/checkout@v4
- name: Get Cached Fixtures
uses: actions/cache/restore@v3
with:
path: ${{ env.FIXTURES_PATH }}
key: fixtures-${{ github.run_id }}
- name: Setup Flutter SDK
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
channel: stable
cache: true
cache-key: "flutter-:os:-:channel:-:version:-:arch:"
- name: Install Flutter dependencies
run: flutter pub get
- name: Setup Melos
run: flutter pub global activate melos
# TODO is all of this required
- name: Setup Coverage Utils
run: flutter pub global activate coverage && flutter pub global activate test_cov_console && flutter pub global activate remove_from_coverage
- name: Run E2E Tests
run: dart test ${{ matrix.test }} -j 1 --run-skipped -t e2e