Design CI/CD workflows to be simple, DRY, and correctly ordered. Specifically:
autofix job; it belongs in a verification job instead.npm run denoify) must run before the steps that depend on them (e.g., npm test).Example — extracting duplicated steps into a composite action instead of repeating them in four separate jobs:
# .github/actions/perf-measure-type-check/action.yml
runs:
using: "composite"
steps:
- run: bun scripts/generate-app.ts
shell: bash
- run: bun tsc -p tsconfig.build.json --diagnostics | bun scripts/process-results.ts > diagnostics.json
shell: bash
Then each job simply calls uses: ./.github/actions/perf-measure-type-check instead of repeating the same steps.