0
0
Fluttermobile~10 mins

CI/CD for Flutter - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to specify the Flutter version in the GitHub Actions workflow.

Flutter
uses: subosito/flutter-action@v1
  with:
    flutter-version: [1]
Drag options to blanks, or click blank then click option'
A2.0.0
B4.0.0
C3.7.0
D1.22.0
Attempts:
3 left
💡 Hint
Common Mistakes
Using an outdated Flutter version that lacks needed features.
Leaving the version blank, causing the workflow to fail.
2fill in blank
medium

Complete the code to run Flutter tests in the GitHub Actions workflow.

Flutter
- name: Run Flutter tests
  run: flutter [1]
Drag options to blanks, or click blank then click option'
Adoctor
Bbuild
Canalyze
Dtest
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'flutter build' instead of 'flutter test' to run tests.
Using 'flutter analyze' which only checks code style.
3fill in blank
hard

Fix the error in the workflow step to build an APK for Android.

Flutter
- name: Build APK
  run: flutter [1] apk --release
Drag options to blanks, or click blank then click option'
Abuild
Brun
Cinstall
Ddeploy
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'flutter run apk' which is invalid syntax.
Using 'flutter deploy' which is not a Flutter CLI command.
4fill in blank
hard

Fill both blanks to set up caching for Flutter dependencies in GitHub Actions.

Flutter
- name: Cache Flutter dependencies
  uses: actions/cache@v3
  with:
    path: [1]
    key: ${{ runner.os }}-flutter-${{ hashFiles('[2]') }}
Drag options to blanks, or click blank then click option'
A~/.pub-cache
Bpubspec.lock
Cbuild
Dflutter.lock
Attempts:
3 left
💡 Hint
Common Mistakes
Caching the 'build' folder which is large and changes often.
Using a wrong lock file name like 'flutter.lock'.
5fill in blank
hard

Fill all three blanks to create a GitHub Actions job that checks out code, sets up Flutter, and runs tests.

Flutter
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/[1]@v3
      - uses: subosito/flutter-action@v1
        with:
          flutter-version: [2]
      - name: Run tests
        run: flutter [3]
Drag options to blanks, or click blank then click option'
Acheckout
B3.7.0
Ctest
Dsetup
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'actions/setup' instead of 'actions/checkout'.
Forgetting to specify the Flutter version.
Running 'flutter build' instead of 'flutter test' in the test step.