← Quiz: CI/CD with GitHub Actions: all 10 questions
Quiz: CI/CD with GitHub Actions · Question 2 of 10
In the workflow, why does the deploy job have needs: test?
In the workflow, why does the deploy job have needs: test?
- A.To run both jobs on the same machine
- B.So deployment only runs after the test job succeeds
- C.To share secrets between jobs
- D.To run tests twice
Answer & explanation
Correct answer: So deployment only runs after the test job succeeds
needs creates a dependency; a failed test job skips the deploy.
Can you get the rest right without peeking?
Take the timed Quiz: CI/CD with GitHub Actions quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →