File tree Expand file tree Collapse file tree 3 files changed +54
-18
lines changed Expand file tree Collapse file tree 3 files changed +54
-18
lines changed Original file line number Diff line number Diff line change 11[
22 {
33 "name" : " Adafruit NeoPixel" ,
4- "version" : " 1.10.6" ,
54 "exclude_targets" : [],
65 "sketch_path" : [
76 " ~/Arduino/libraries/Adafruit_NeoPixel/examples/strandtest/strandtest.ino"
Original file line number Diff line number Diff line change 7272 name : ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
7373 path : ${{ env.SKETCHES_REPORTS_PATH }}
7474
75- report-comment :
76- needs : compile-sketch # Wait for the compile job to finish to get the data for the report
77- if : github.event_name == 'pull_request' # Only run the job when the workflow is triggered by a pull request
78- runs-on : ubuntu-latest
79- steps :
80- # This step is needed to get the size data produced by the compile jobs
81- - name : Download sketches reports artifact
82- uses : actions/download-artifact@v3
83- with :
84- name : ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
85- path : ${{ env.SKETCHES_REPORTS_PATH }}
86-
87- - name : Report results
88- uses : P-R-O-C-H-Y/report-size-deltas@main
89- with :
90- sketches-reports-source : ${{ env.SKETCHES_REPORTS_PATH }}
91-
9275 report-to-file :
9376 needs : compile-sketch # Wait for the compile job to finish to get the data for the report
9477 if : github.event_name == 'schedule' # Only run the job when the workflow is triggered by a schedule
@@ -126,3 +109,16 @@ jobs:
126109 git add ${{ env.RESULT_LIBRARY_TEST_FILE }}
127110 git commit -m "Generated External Libraries Test Results"
128111 git push
112+
113+ event_file :
114+ name : " Event File"
115+ if : |
116+ contains(github.event.pull_request.labels.*.name, 'lib_test')
117+ needs : compile-sketch
118+ runs-on : ubuntu-latest
119+ steps :
120+ - name : Upload
121+ uses : actions/upload-artifact@v2
122+ with :
123+ name : Event File
124+ path : ${{github.event_path}}
Original file line number Diff line number Diff line change 1+ name : External Libraries Results
2+
3+ on :
4+ workflow_run :
5+ workflows : [External Libraries Test]
6+ types :
7+ - completed
8+
9+ workflow_dispatch :
10+ env :
11+ # It's convenient to set variables for values used multiple times in the workflow
12+ SKETCHES_REPORTS_PATH : artifacts/libraries-report
13+ GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
14+ PR_EVENT_PATH : artifacts/Event File/event.json
15+
16+ jobs :
17+ lib-test-results :
18+ name : External Libraries Test Results
19+ runs-on : ubuntu-latest
20+ if : |
21+ github.event.workflow_run.event == 'pull_request' &&
22+ github.event.workflow_run.conclusion == 'success'
23+
24+ steps :
25+ - name : Download and Extract Artifacts
26+ run : |
27+ mkdir -p artifacts && cd artifacts
28+ artifacts_url=${{ github.event.workflow_run.artifacts_url }}
29+ gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact
30+ do
31+ IFS=$'\t' read name url <<< "$artifact"
32+ gh api $url > "$name.zip"
33+ unzip -d "$name" "$name.zip"
34+ done
35+
36+ - name : Report results
37+ uses : P-R-O-C-H-Y/report-size-deltas@main
38+ with :
39+ sketches-reports-source : ${{ env.SKETCHES_REPORTS_PATH }}
40+ github-token : ${{ env.GITHUB_TOKEN }}
41+ pr-event-path : ${{ env.PR_EVENT_PATH }}
You can’t perform that action at this time.
0 commit comments