Your scheduled audit in GitHub Actions should fail the workflow on critical findings but still upload the report. How do you wire it?
IntermediateScenarioTesting, CI/CD, packaging & services
Answer
Situation read → Need the artifact even when the step fails.
What I'd do →
- Give the audit step an
idandcontinue-on-error: true. - Upload the report with
actions/upload-artifact@v4andif: always(); write the Markdown report to$GITHUB_STEP_SUMMARY. - A final step fails the job if
steps.audit.outcome == 'failure'.
Why → Separating "run" from "judge" keeps evidence even on failure.
Interview tip → Our lab workflow uses exactly this pattern.
More on Testing, CI/CD, packaging & services
You join a team whose Python automation repo has no tests. Where do you start?BeginnerYour pytest suite takes 12 minutes. How do you speed it up?IntermediateA test passes locally but fails in CI only when run with the rest of the suite. What do you suspect?IntermediateYou want a reusable CI pipeline for 15 Python tool repos. What goes in it?IntermediateYour Python Docker image is 1.1 GB. How do you shrink it?IntermediateYou want to distribute an internal CLI to 200 engineers. What are your options?Intermediate