Challenge - 5 Problems
React Native CI/CD Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
💻 Command Output
intermediate1:30remaining
Output of a basic React Native build command in CI
What is the expected output snippet when running
npx react-native run-android --variant=release in a CI environment after a successful build?React Native
npx react-native run-android --variant=release
Attempts:
2 left
💡 Hint
Look for messages indicating a successful build and app installation.
✗ Incorrect
The command triggers a release build for Android. A successful build shows 'BUILD SUCCESSFUL' and installation messages. Errors or missing commands indicate failure.
❓ Configuration
intermediate2:00remaining
Correct GitHub Actions step to cache React Native dependencies
Which GitHub Actions step correctly caches
node_modules and ~/.gradle folders to speed up React Native CI builds?Attempts:
2 left
💡 Hint
Caching both node_modules and Gradle folders together with a proper key is best.
✗ Incorrect
Option C caches both node_modules and Gradle folders using actions/cache@v3 with a key based on package-lock.json hash, ensuring cache updates on dependency changes.
🔀 Workflow
advanced2:30remaining
Correct order of steps in a React Native CI/CD pipeline
Arrange the following steps in the correct order for a React Native CI/CD pipeline on Android:
Attempts:
2 left
💡 Hint
You must install dependencies before testing and building.
✗ Incorrect
First install dependencies, then run tests to verify code, next build the APK, and finally upload it for distribution.
❓ Troubleshoot
advanced2:00remaining
Diagnosing a failed React Native Android build in CI
A CI build fails with the error:
Execution failed for task ':app:mergeReleaseResources'. What is the most likely cause?Attempts:
2 left
💡 Hint
The error relates to merging resources, not Node.js or React Native versions.
✗ Incorrect
The ':mergeReleaseResources' task fails usually due to missing or conflicting image, XML, or other resource files in the Android project.
✅ Best Practice
expert2:30remaining
Best practice for securing secrets in React Native CI/CD pipelines
Which method is the best practice to securely manage API keys and secrets in a React Native CI/CD pipeline?
Attempts:
2 left
💡 Hint
Secrets should never be committed to source code or exposed publicly.
✗ Incorrect
Using environment variables in the CI platform keeps secrets out of source code and allows secure injection during build without exposure.