[GH-ISSUE #941] Enhancement: Summarize Job Results and Separate Job Outputs #553

Closed
opened 2026-03-01 21:44:28 +03:00 by kerem · 2 comments
Owner

Originally created by @adamsmd on GitHub (Dec 26, 2021).
Original GitHub issue: https://github.com/nektos/act/issues/941

Is there some way to summarize job results and separate job outputs (or some other project that builds on this one to add that)? For example, like how GitHub shows particular runs of a workflow.

I have some jobs with large matrices, and it would be helpful to have something that makes it easier to track which entries failed and trace the failure causes.

Originally created by @adamsmd on GitHub (Dec 26, 2021). Original GitHub issue: https://github.com/nektos/act/issues/941 Is there some way to summarize job results and separate job outputs (or some other project that builds on this one to add that)? For example, like how GitHub shows particular runs of a workflow. I have some jobs with large matrices, and it would be helpful to have something that makes it easier to track which entries failed and trace the failure causes.
kerem 2026-03-01 21:44:28 +03:00
Author
Owner

@pwoolvett commented on GitHub (Jan 5, 2022):

My grain of sand: alias act='act | tee >(grep -P "\x{2705}|\x{274c}|\x{2b50}|\x{1F9EA}|\x{1F680}" >summary.log) act.log'

Explanation and usage (bash):

  1. use named jobs and include matrix data in the name, eg:

    jobs:
      default:
        name: "${{ matrix.env }}-${{ matrix.os }})"
    
  2. instead of act, run act | tee >(grep -P "\x{2705}|\x{274c}|\x{2b50}|\x{1F9EA}|\x{1F680}" >summary.log) act.log

    • This filters out all code not containing the emojis by their unicode, eg (=2705) for success, (=274C) for failures, etc
    • act.log contains copy of the terminal output
    • summary.log contains the filtered version. You can add or remove emojis to the grep to have more or less info, eg keep only if you want to look at failed ones: act | tee >(grep -P "\x{274c}" >summary.log) act.log
  3. let act run

  4. Look at summary.log and copy a job's name which requires attention. It has the format :<pipeline name>/<job name>

  5. Do something

    4.1 Job summary: cat act.log | fgrep "<job name>" | grep -P "\x{2705}|\x{274c}|\x{2b50}|\x{1F9EA}|\x{1F680}"
    4.2 Job output after error only, cat act.log | fgrep "<job name>" | fgrep -A $(cat act.log | wc -l) "$(cat act.log | fgrep "<job name>" | grep -P "\x{2b50}" | tail -1)"
    4.3 Full output: cat act.log | fgrep "<job name>"

I've got these aliased and as functions in bashrc
My only problem so far is the summary get populated when act finishes...

<!-- gh-comment-id:1005878546 --> @pwoolvett commented on GitHub (Jan 5, 2022): My grain of sand: `alias act='act | tee >(grep -P "\x{2705}|\x{274c}|\x{2b50}|\x{1F9EA}|\x{1F680}" >summary.log) act.log'` Explanation and usage (bash): 0. use named jobs and include matrix data in the name, eg: ```yaml jobs: default: name: "${{ matrix.env }}-${{ matrix.os }})" ```` 1. instead of `act`, run `act | tee >(grep -P "\x{2705}|\x{274c}|\x{2b50}|\x{1F9EA}|\x{1F680}" >summary.log) act.log` * This filters out all code not containing the emojis by their unicode, eg ✅ (=2705) for success, ❌ (=274C) for failures, etc * `act.log` contains copy of the terminal output * `summary.log` contains the filtered version. You can add or remove emojis to the grep to have more or less info, eg keep only ❌ if you want to look at failed ones: `act | tee >(grep -P "\x{274c}" >summary.log) act.log` 2. let act run 3. Look at `summary.log` and copy a job's name which requires attention. It has the format :`<pipeline name>/<job name>` 4. Do something 4.1 Job summary: `cat act.log | fgrep "<job name>" | grep -P "\x{2705}|\x{274c}|\x{2b50}|\x{1F9EA}|\x{1F680}"` 4.2 Job output after error only, `cat act.log | fgrep "<job name>" | fgrep -A $(cat act.log | wc -l) "$(cat act.log | fgrep "<job name>" | grep -P "\x{2b50}" | tail -1)"` 4.3 Full output: `cat act.log | fgrep "<job name>"` I've got these aliased and as functions in `bashrc` My only problem so far is the `summary` get populated when act finishes...
Author
Owner

@github-actions[bot] commented on GitHub (Feb 5, 2022):

Issue is stale and will be closed in 14 days unless there is new activity

<!-- gh-comment-id:1030449030 --> @github-actions[bot] commented on GitHub (Feb 5, 2022): Issue is stale and will be closed in 14 days unless there is new activity
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/act#553
No description provided.