Unverified Commit 30ab1c3c authored by Jan Procházka's avatar Jan Procházka Committed by GitHub

CI External Libraries Test - Results comment fix (#8035)

* add new workflow

* Update lib.yml

* Update publishlib.yml

* Update lib.yml

* Create TESTFILE.txt

* Update TESTFILE.txt

* Update publishlib.yml

* Return original lib.json

* remove comment

* remove file
parent 4cb596a5
[
{
"name": "Adafruit NeoPixel",
"version": "1.10.6",
"exclude_targets": [],
"sketch_path": [
"~/Arduino/libraries/Adafruit_NeoPixel/examples/strandtest/strandtest.ino"
......
......@@ -72,23 +72,6 @@ jobs:
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
path: ${{ env.SKETCHES_REPORTS_PATH }}
report-comment:
needs: compile-sketch # Wait for the compile job to finish to get the data for the report
if: github.event_name == 'pull_request' # Only run the job when the workflow is triggered by a pull request
runs-on: ubuntu-latest
steps:
# This step is needed to get the size data produced by the compile jobs
- name: Download sketches reports artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.SKETCHES_REPORTS_ARTIFACT_NAME }}
path: ${{ env.SKETCHES_REPORTS_PATH }}
- name: Report results
uses: P-R-O-C-H-Y/report-size-deltas@main
with:
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}
report-to-file:
needs: compile-sketch # Wait for the compile job to finish to get the data for the report
if: github.event_name == 'schedule' # Only run the job when the workflow is triggered by a schedule
......@@ -126,3 +109,16 @@ jobs:
git add ${{ env.RESULT_LIBRARY_TEST_FILE }}
git commit -m "Generated External Libraries Test Results"
git push
event_file:
name: "Event File"
if: |
contains(github.event.pull_request.labels.*.name, 'lib_test')
needs: compile-sketch
runs-on: ubuntu-latest
steps:
- name: Upload
uses: actions/upload-artifact@v2
with:
name: Event File
path: ${{github.event_path}}
name: External Libraries Results
on:
workflow_run:
workflows: [External Libraries Test]
types:
- completed
workflow_dispatch:
env:
# It's convenient to set variables for values used multiple times in the workflow
SKETCHES_REPORTS_PATH: artifacts/libraries-report
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
PR_EVENT_PATH: artifacts/Event File/event.json
jobs:
lib-test-results:
name: External Libraries Test Results
runs-on: ubuntu-latest
if: |
github.event.workflow_run.event == 'pull_request' &&
github.event.workflow_run.conclusion == 'success'
steps:
- name: Download and Extract Artifacts
run: |
mkdir -p artifacts && cd artifacts
artifacts_url=${{ github.event.workflow_run.artifacts_url }}
gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact
do
IFS=$'\t' read name url <<< "$artifact"
gh api $url > "$name.zip"
unzip -d "$name" "$name.zip"
done
- name: Report results
uses: P-R-O-C-H-Y/report-size-deltas@main
with:
sketches-reports-source: ${{ env.SKETCHES_REPORTS_PATH }}
github-token: ${{ env.GITHUB_TOKEN }}
pr-event-path: ${{ env.PR_EVENT_PATH }}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment