Explore the foundational concepts of workflows, jobs, and runners with this interactive quiz on automation pipelines. Assess your understanding of configuring workflows, orchestrating jobs, and selecting appropriate runners for successful continuous integration and deployment.
Which statement best describes how a workflow is triggered in an automation pipeline, for example when code is pushed to a repository?
Explanation: Workflows are typically triggered automatically when a specified event occurs, such as when code is pushed or a pull request is created. Option B is incorrect because manual triggers are optional, not the default. Option C is inaccurate, as workflows can be scheduled far more frequently than once a month. Option D misstates the process; external webhooks are one trigger type but not the only or most common one.
In a workflow file, how can you ensure that one job starts only after another has successfully completed?
Explanation: The 'needs' keyword is used to specify that one job depends on another, ensuring correct execution order. Listing jobs alphabetically (option B) does not establish dependencies. Option C, 'delay' property, does not control job sequencing. Option D, renaming jobs, has no impact on workflow execution order.
Which of the following best explains the purpose of a runner in a workflow execution scenario?
Explanation: A runner is the computing environment that processes the steps defined in each job of a workflow. Option B is incorrect because version control data is managed separately. Option C is not correct; sending notifications can be a job, but it isn't the runner's main role. Option D relates to code review assignments, which are not the runner's function.
Where should an automation workflow configuration file be placed to be automatically detected by the system?
Explanation: The system automatically detects and runs workflow files located in the .github/workflows directory. Using a .txt extension at the repository root (option B) is not recognized by the workflow engine. Option C is incorrect because files outside the designated directory are ignored. Option D is also wrong, as workflows in random or deeply nested folders are not detected.
What happens when a workflow defines multiple jobs without any dependencies between them?
Explanation: If no dependencies are specified, jobs in a workflow are processed in parallel to improve efficiency. Option B is incorrect; jobs are not merged into a single process by default. Option C is not how execution order is determined unless dependencies exist. Option D is incorrect since workflows do not require explicit dependencies for jobs to execute properly.