Answer these 35 questions to check your understanding of this module. Click on an option to reveal the correct answer instantly.
Question 1 of 35
What file defines a GitHub Actions workflow?
A. Dockerfile
B. .gitlab-ci.yml
C. .github/workflows/main.yml
D. package.json
Explanation: GitHub Actions workflows are defined in YAML files in the .github/workflows directory.
Question 2 of 35
What triggers a workflow?
A. A listener
B. An event (e.g., push, pull_request)
C. A compiler
D. A server restart
Explanation: Workflows are triggered by events such as push, pull_request, or schedule.
Question 3 of 35
What is a "Runner"?
A. A test script
B. A server that runs your workflow jobs
C. A deployment target
D. A user
Explanation: A runner is a server that runs your workflows when they are triggered.
Question 4 of 35
How do you define a job in a workflow?
A. tasks:
B. jobs:
C. steps:
D. run:
Explanation: Jobs are defined under the "jobs" key in the workflow YAML file.
Question 5 of 35
What keyword runs commands in a step?
A. execute
B. cmd
C. run
D. do
Explanation: The "run" keyword executes command-line programs.
Question 6 of 35
How do you use an action from the marketplace?
A. import
B. uses
C. include
D. require
Explanation: The "uses" keyword specifies an action to run as part of a step.
Question 7 of 35
Where do you store sensitive data like keys?
A. In code
B. GitHub Secrets
C. README.md
D. Commit messages
Explanation: GitHub Secrets are encrypted environment variables for sensitive data.
Question 8 of 35
How do you access a secret in a workflow?
A. $SECRET
B. ${{ secrets.NAME }}
C. %SECRET%
D. env.SECRET
Explanation: Secrets are accessed using the ${{ secrets.NAME }} syntax.
Question 9 of 35
What allows sharing data between jobs?
A. Artifacts
B. Variables
C. Cookies
D. Emails
Explanation: Artifacts allow you to persist data after a job completes and share it.
Question 10 of 35
Can you run workflows on a schedule?
A. No
B. Yes, using cron syntax
C. Only manually
D. Only on push
Explanation: You can use the "schedule" event with cron syntax.
Question 11 of 35
What is a "Self-hosted runner"?
A. A GitHub server
B. A machine you manage to run jobs
C. A cloud instance
D. A local script
Explanation: Self-hosted runners are machines that you manage and maintain.
Question 12 of 35
How do you define dependencies between jobs?
A. depends_on
B. needs
C. requires
D. after
Explanation: The "needs" keyword identifies any jobs that must complete successfully before this job will run.
Question 13 of 35
What creates a matrix of different configurations?
A. strategy: matrix
B. loop: array
C. config: multiple
D. build: list
Explanation: A build matrix allows you to run jobs across multiple OS/versions simultaneously.
Question 14 of 35
What is "GITHUB_TOKEN"?
A. A user password
B. An automatically generated secret for authentication
C. A public key
D. A license key
Explanation: GITHUB_TOKEN is an auto-generated secret used to authenticate in a workflow run.
Question 15 of 35
How do you filter a workflow to specific branches?
A. only:
B. branches:
C. filter:
D. limit:
Explanation: You use "branches" under "push" or "pull_request" events.
Question 16 of 35
What is the default shell on Linux runners?
A. zsh
B. bash
C. sh
D. fish
Explanation: Bash is the default shell on Linux runners.
Question 17 of 35
How do you set an environment variable for a step?
A. set:
B. var:
C. env:
D. export:
Explanation: The "env" map sets environment variables for the entire workflow, a job, or a step.
Question 18 of 35
Which action checks out your repository code?
A. actions/download
B. actions/checkout
C. git/clone
D. actions/pull
Explanation: actions/checkout checks out your repository so your workflow can access it.
Question 19 of 35
What status check makes a job fail?
A. exit 0
B. exit 1 (non-zero)
C. return true
D. echo error
Explanation: A non-zero exit code indicates failure.
Question 20 of 35
Can you manually trigger a workflow?
A. No
B. Yes, using workflow_dispatch
C. Yes, using manual_trigger
D. Only via API
Explanation: The "workflow_dispatch" event allows manual triggering.
Question 21 of 35
How do you cache dependencies?
A. actions/save
B. actions/cache
C. actions/store
D. npm cache
Explanation: The actions/cache action allows caching dependencies to speed up workflows.
Question 22 of 35
What is a composite action?
A. An action combining multiple steps
B. A binary action
C. A docker action
D. A java action
Explanation: Composite actions allow you to combine multiple workflow steps into one action.
Question 23 of 35
Where can you view workflow logs?
A. In the console
B. In the Actions tab on GitHub
C. Via email
D. In the README
Explanation: Logs are visible in the Actions tab of the repository.
Question 24 of 35
How to conditionally run a step?
A. when:
B. if:
C. case:
D. switch:
Explanation: The "if" conditional prevents a job or step from running unless a condition is met.
Question 25 of 35
What limits the free tier of GitHub Actions?
A. Number of workflows
B. Storage and Minutes
C. Number of users
D. Lines of code
Explanation: Free tier is limited by storage (artifacts) and execution minutes per month.
Question 26 of 35
What is the distinction between Continuous Delivery and Continuous Deployment?
A. Continuous Delivery compiles code; Continuous Deployment runs automated unit tests.
B. Continuous Delivery requires manual approval to deploy to production; Continuous Deployment automates release without manual steps.
C. Delivery works only with VMs; Deployment is docker container-specific.
D. They are exact synonyms without structural differences.
Explanation: Both automate testing and build stages. Delivery staging releases require manual promotion decisions. Deployment executes automated production pushes immediately.
Question 27 of 35
How does a Pull-based GitOps deployment tool (like ArgoCD) operate?
A. It runs CI code pipelines inside GitHub servers.
B. An agent inside the Kubernetes cluster pulls changes from Git and applies them locally, preventing configuration drift.
C. It forces git pull actions on the developer local machine.
D. It pushes Docker images to repositories.
Explanation: Pull-based GitOps tools run inside the environment, querying Git for changes and syncing local state automatically to match defined source configurations.
Question 28 of 35
Which deployment strategy routes a small percentage of user traffic to the new version before rolling it out globally?
A. Blue-Green Deployment
B. Canary Deployment
C. Rolling Update
D. Recreate Strategy
Explanation: Canary deployments deploy updates to a fraction of the infrastructure, allowing real user validation before committing to a full upgrade.
Question 29 of 35
What is the focus of SAST (Static Application Security Testing) in a CI pipeline?
A. Scanning the source code for vulnerabilities and patterns without running the application.
B. Probing running server endpoints for open ports.
C. Analyzing runtime application logs.
D. Validating network firewall rules.
Explanation: SAST analyzes source files statically to identify security flaws before code compilation and packaging.
Question 30 of 35
What is a key security reason to use Self-Hosted Runners for CI/CD?
A. They run pipelines faster than cloud systems.
B. To execute pipelines within private networks without exposing API keys or credentials externally.
C. To bypass container registry authentication steps.
D. To automatically sign compiled binaries.
Explanation: Self-hosted runners operate inside private cloud VPC environments, avoiding data or credential leaks to external runner systems.
Question 31 of 35
How does pipeline caching differ from pipeline artifacts?
A. Artifacts run in parallel; caching executes sequentially.
B. Caching accelerates builds by sharing intermediate packages (e.g. node_modules) across runs; Artifacts store build outputs (e.g. binary packages).
C. Caching is stored on local disks; artifacts are stored on docker containers.
D. Neither persists after pipeline termination.
Explanation: Caching reuse dependency libraries to avoid re-downloads in future builds. Artifacts hold output packages generated during runtime.
Question 32 of 35
What is the role of webhooks in Git-driven CI/CD systems?
A. To browse file changes inside browser screens.
B. To send real-time POST events from Git providers to trigger pipeline runs immediately upon pushes.
C. To test database configurations during staging.
D. To handle load balancing across runners.
Explanation: Webhooks trigger pipeline endpoints instantaneously on commit events, eliminating slow polling loops.
Question 33 of 35
Which strategy deploys code to a separate, identical infrastructure stack and routes traffic instantaneously by altering router/DNS mappings?
A. Blue-Green Deployment
B. Canary Deployment
C. Rolling Update
D. Recreate Strategy
Explanation: Blue-Green strategies use two matching clusters. One is active (Blue), the other receives updates (Green). A router switch transfers users instantly.
Question 34 of 35
How should a CD pipeline respond if production validation steps fail during a canary rollout?
A. Suspend all cluster nodes.
B. Automatically roll back traffic and configuration targets to the previous stable release.
C. Continue deployment to collect log data.
D. Prompt system administrator to commit fixes.
Explanation: Automated rollback rules revert config modifications and traffic routing to stable versions, protecting users from active bugs.
Question 35 of 35
In Trunk-Based Development, what is a best practice for trigger rule patterns?
A. Only trigger full production pipelines on merges or pushes to the default branch.
B. Run production deployments on all topic branches.
C. Avoid running lint validation rules on master.
D. Manually run builds on local setups only.
Explanation: Trunk-based triggers deploy to production continuously as updates merge into the shared main trunk.