CICD-200 · Add elapsed runtime to evidence
Encyclopedia · CI diagnostics and evidence · All snippets
Previous · CICD-199 · Next · CICD-201
1. Where it fits
- Placement Bash run step following checkout, or equivalent lab terminal.
- Prerequisites authorized fixture run and sanitized evidence location.
- Platforms local-linux, github-actions, gitea-actions.
- Parameters
GITHUB_STEP_SUMMARY,SECONDS.
2. Copy the snippet
bash
start=$SECONDS
./scripts/check.sh
printf 'elapsed_seconds=%d\n' "$((SECONDS-start))" >> "$GITHUB_STEP_SUMMARY"3. How it works
The command archives or inspects the selected files. Verify the relative paths and file set before using the archive downstream.
4. Verify the result
Store elapsed duration for successful checks and record failed durations in a separate diagnostic trap if needed.
Validation syntax-validated (Bash parse). Status definitions.