File tree 2 files changed +17
-4
lines changed
2 files changed +17
-4
lines changed Original file line number Diff line number Diff line change @@ -30,10 +30,18 @@ jobs:
30
30
uses : actions/checkout@v3
31
31
- name : Setup
32
32
run : |
33
- gh run list -b master -s failure --json displayTitle,workflowName > runlist .json
33
+ gh run list -R project-chip/connectedhomeip - b master -s failure --json displayTitle,workflowName > run_list .json
34
34
pip install pandas
35
35
env :
36
36
GH_TOKEN : ${{ github.token }}
37
37
- name : Run Summarization Script
38
38
run : python scripts/tools/summarize_fail.py
39
+ - name : Upload Logs
40
+ uses : actions/upload-artifact@v3
41
+ with :
42
+ name : workflow-fail-summary
43
+ path : |
44
+ recent_fails.csv
45
+ recent_fails_frequency.csv
46
+ retention-days : 5
39
47
Original file line number Diff line number Diff line change 1
1
import pandas as pd
2
2
3
- df = pd .read_json ("runlist.json" )
3
+ df = pd .read_json ("run_list.json" )
4
+ df .columns = ["Pull Request" , "Workflow" ]
4
5
print ("Recent Failures:" )
5
- print (df )
6
+ print (df .to_string (index = False ))
7
+ df .to_csv ("recent_fails.csv" , index = False )
8
+ print ()
6
9
print ("Percentage Frequency:" )
7
- print (df ["workflowName" ].value_counts (normalize = True ) * 100 )
10
+ frequency = df ["Workflow" ].value_counts (normalize = True ).mul (100 ).astype (str ) + "%"
11
+ print (frequency .to_string ())
12
+ frequency .to_csv ("recent_fails_frequency.csv" )
You can’t perform that action at this time.
0 commit comments