What does CI/CD stand for in software development?
CI/CD stands for Continuous Integration and Continuous Delivery (or Continuous Deployment). It means automatically building, testing, and delivering apps to users.
Click to reveal answer
beginner
Why is CI/CD important for Flutter app development?
CI/CD helps Flutter developers catch errors early, automate testing, and deliver app updates faster and more reliably to users.
Click to reveal answer
beginner
Name a popular CI/CD tool that can be used with Flutter projects.
GitHub Actions is a popular tool that can automate Flutter app builds, tests, and deployments.
Click to reveal answer
intermediate
What is a typical first step in setting up CI for a Flutter app?
The first step is to create a workflow file that runs Flutter commands like 'flutter pub get' and 'flutter test' automatically on code changes.
Click to reveal answer
intermediate
How does Continuous Delivery differ from Continuous Deployment in Flutter CI/CD?
Continuous Delivery means the app is ready to release after automated steps, but a person decides when to publish. Continuous Deployment means the app is automatically published after passing tests.
Click to reveal answer
Which command is used to run Flutter tests in a CI pipeline?
Aflutter pub get
Bflutter build apk
Cflutter clean
Dflutter test
✗ Incorrect
The 'flutter test' command runs automated tests in Flutter projects.
What file is commonly used to define CI workflows in GitHub Actions for Flutter?
Aflutter.yml
B.github/workflows/flutter.yml
Cci.yml
Dmain.yaml
✗ Incorrect
GitHub Actions workflows are stored in the '.github/workflows/' directory.
Which step is NOT typically part of a Flutter CI pipeline?
ARunning unit tests
BBuilding the app
CDeploying to production without tests
DFetching dependencies
✗ Incorrect
Deploying without tests is unsafe and not recommended in CI pipelines.
What does 'flutter pub get' do in a CI workflow?
AFetches app dependencies
BCleans the project
CBuilds the app
DRuns tests
✗ Incorrect
'flutter pub get' downloads the packages your app needs.
In CI/CD, what is the main benefit of automating Flutter app builds?
AFaster and consistent app delivery
BSlower development
CManual error checking
DIgnoring test results
✗ Incorrect
Automation speeds up delivery and reduces human errors.
Explain the basic steps to set up a CI pipeline for a Flutter app using GitHub Actions.
Think about commands to fetch packages, test, and build.
You got /4 concepts.
Describe the difference between Continuous Integration, Continuous Delivery, and Continuous Deployment in Flutter development.
Focus on automation levels and release steps.
You got /3 concepts.
Practice
(1/5)
1. What is the main purpose of using CI/CD in Flutter app development?
easy
A. To automate building, testing, and deploying the app
B. To write Flutter code faster manually
C. To design app UI without coding
D. To run the app only on physical devices
Solution
Step 1: Understand CI/CD basics
CI/CD stands for Continuous Integration and Continuous Delivery, which automates building and testing.
Step 2: Apply to Flutter context
In Flutter, CI/CD runs commands like flutter pub get, flutter test, and flutter build automatically.
Final Answer:
To automate building, testing, and deploying the app -> Option A
Quick Check:
CI/CD automates app build and test = A [OK]
Hint: CI/CD means automate build and test steps [OK]
Common Mistakes:
Thinking CI/CD is manual coding
Confusing UI design with CI/CD
Believing CI/CD only runs on devices
2. Which of the following is the correct command to run Flutter tests in a CI workflow?
easy
A. flutter test
B. flutter pub get
C. flutter build apk
D. flutter run
Solution
Step 1: Identify test command in Flutter
The command to run tests in Flutter is flutter test.
Step 2: Differentiate from other commands
flutter build apk builds the app, flutter pub get fetches packages, and flutter run runs the app on a device.
Final Answer:
flutter test -> Option A
Quick Check:
Run tests = flutter test = A [OK]
Hint: Tests run with 'flutter test' command [OK]
Common Mistakes:
Using 'flutter build apk' to run tests
Confusing 'flutter pub get' with testing
Trying to run tests with 'flutter run'
3. Given this GitHub Actions snippet for Flutter CI:
steps:
- uses: actions/checkout@v3
- name: Install Flutter
uses: subosito/flutter-action@v2
- name: Get dependencies
run: flutter pub get
- name: Run tests
run: flutter test
- name: Build APK
run: flutter build apk --release
But the build fails with "flutter: command not found". What is the likely cause?
medium
A. The shell should be powershell, not bash
B. The build command syntax is incorrect
C. The APK build requires emulator running
D. Flutter SDK is not installed or not added to PATH
Solution
Step 1: Analyze error message
"flutter: command not found" means the system cannot find the Flutter tool.
Step 2: Identify missing setup
This usually happens if Flutter SDK is not installed or its path is not set in the environment before running the build.
Final Answer:
Flutter SDK is not installed or not added to PATH -> Option D
Quick Check:
Command not found = missing Flutter setup = C [OK]
Hint: Ensure Flutter SDK is installed and in PATH before build [OK]
Common Mistakes:
Blaming command syntax for 'command not found'
Thinking shell type causes missing command
Assuming emulator is needed for build
5. You want to speed up your Flutter CI workflow by caching dependencies. Which step should you add before flutter pub get to cache packages in GitHub Actions?
hard
A. Run flutter clean before flutter pub get
B. Use actions/cache@v3 with path ~/.pub-cache and key based on pubspec.yaml
C. Add flutter build apk before flutter pub get
D. Use actions/upload-artifact@v3 to upload pubspec.yaml
Solution
Step 1: Understand caching in GitHub Actions
actions/cache@v3 caches files between workflow runs to speed up repeated steps.
Step 2: Apply caching to Flutter dependencies
Flutter packages are stored in ~/.pub-cache; caching this folder keyed by pubspec.yaml hash speeds up flutter pub get.
Final Answer:
Use actions/cache@v3 with path ~/.pub-cache and key based on pubspec.yaml -> Option B
Quick Check:
Cache ~/.pub-cache with actions/cache = B [OK]
Hint: Cache ~/.pub-cache keyed by pubspec.yaml for faster builds [OK]
Common Mistakes:
Running flutter clean which clears cache
Building APK before fetching dependencies
Uploading pubspec.yaml as artifact instead of caching
Recommended
Ready to prove it?
Pass the test and this pattern moves unknownstrongwhile earning +1 Grip toward your certificate.