From 434a7a282cfe851d4da56bf2aed19d9785832829 Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 11 Sep 2020 11:11:23 -0700 Subject: [PATCH 1/6] Correct branch name shown in example snippets in readme Unlike the original repository, this repository uses a default branch named `main` instead of `master`. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0c1ad2b..ec100f5 100644 --- a/README.md +++ b/README.md @@ -22,5 +22,5 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: arduino/report-size-deltas@master + - uses: arduino/report-size-deltas@main ``` From dde341e7e5233cc9f7534c8621b23314527e9407 Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 11 Sep 2020 11:12:39 -0700 Subject: [PATCH 2/6] Improve formatting of readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ec100f5..2b86e9f 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# arduino/report-size-deltas action +# `arduino/report-size-deltas` action This action comments on the pull request with a report on the resulting change in memory usage of the [Arduino](https://www.arduino.cc/) sketches compiled by the [`arduino/compile-sketches`](https://github.com/arduino/compile-sketches) action. This should be run from a [scheduled workflow](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule). From af41e45f4436720917385ebd009305ab89cdc198 Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 11 Sep 2020 11:16:55 -0700 Subject: [PATCH 3/6] Format the documentation to make default input values easy to find Previously, the information on whether an input had a default value -- and if so, what -- was incorporated into the input description. This meant you had to read the entire description to find this information. When using other actions, I have regularly had difficulty determining which inputs are required and default input values. I would like for the users of this action to not have that experience. --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 2b86e9f..69267c8 100644 --- a/README.md +++ b/README.md @@ -6,11 +6,15 @@ This action comments on the pull request with a report on the resulting change i ### `size-deltas-reports-artifact-name` -Name of the workflow artifact that contains the memory usage data, as specified to the [`actions/upload-artifact`](https://github.com/actions/upload-artifact) action via its `name` input. Default "size-deltas-reports". +Name of the workflow artifact that contains the memory usage data, as specified to the [`actions/upload-artifact`](https://github.com/actions/upload-artifact) action via its `name` input. + +**Default**: `"size-deltas-reports"` ### `github-token` -GitHub access token used to comment the memory usage comparison results to the PR thread. Default [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token). +GitHub access token used to comment the memory usage comparison results to the PR thread. + +**Default**: [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token). ## Example usage From 9da7daf4e2e2fd385a3fc3356c466c6e090f7b41 Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 11 Sep 2020 11:17:24 -0700 Subject: [PATCH 4/6] Linkify readme text where appropriate to provide easy access to supporting information --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 69267c8..1e1af51 100644 --- a/README.md +++ b/README.md @@ -6,15 +6,15 @@ This action comments on the pull request with a report on the resulting change i ### `size-deltas-reports-artifact-name` -Name of the workflow artifact that contains the memory usage data, as specified to the [`actions/upload-artifact`](https://github.com/actions/upload-artifact) action via its `name` input. +Name of the [workflow artifact](https://docs.github.com/en/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts) that contains the memory usage data, as specified to the [`actions/upload-artifact`](https://github.com/actions/upload-artifact) action via its `name` input. **Default**: `"size-deltas-reports"` ### `github-token` -GitHub access token used to comment the memory usage comparison results to the PR thread. +[GitHub access token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) used to comment the memory usage comparison results to the PR thread. -**Default**: [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token). +**Default**: [`GITHUB_TOKEN`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) ## Example usage From 54b351fd8515d58207612c289fcddc6fd4e07c9a Mon Sep 17 00:00:00 2001 From: per1234 Date: Fri, 11 Sep 2020 11:21:16 -0700 Subject: [PATCH 5/6] Add badges to readme to indicate CI status --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 1e1af51..2869ec0 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,9 @@ # `arduino/report-size-deltas` action +[![Tests](https://github.com/arduino/report-size-deltas/workflows/libraries/report-size-deltas%20workflow/badge.svg)](https://github.com/arduino/report-size-deltas/actions?workflow=libraries/report-size-deltas+workflow) +[![Spell Check](https://github.com/arduino/report-size-deltas/workflows/Spell%20Check/badge.svg)](https://github.com/arduino/report-size-deltas/actions?workflow=Spell+Check) +[![codecov](https://codecov.io/gh/arduino/report-size-deltas/branch/master/graph/badge.svg)](https://codecov.io/gh/arduino/report-size-deltas) + This action comments on the pull request with a report on the resulting change in memory usage of the [Arduino](https://www.arduino.cc/) sketches compiled by the [`arduino/compile-sketches`](https://github.com/arduino/compile-sketches) action. This should be run from a [scheduled workflow](https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#onschedule). ## Inputs From 7b01d2997151c0543f2ca9a44a4e3105ff85601e Mon Sep 17 00:00:00 2001 From: per1234 Date: Mon, 14 Sep 2020 12:00:05 -0700 Subject: [PATCH 6/6] Add example companion workflow for creating sketches report workflow artifact to readme Adding the example workflow to generate the workflow artifact to the arduino/report-size-deltas readme allows the arduino/compile-sketches readme to only demonstrate the basic use of the action without confusing the issue by showing the creation of a workflow artifact that will only be of use to arduino/report-size-deltas users. --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 2869ec0..d7784b5 100644 --- a/README.md +++ b/README.md @@ -32,3 +32,20 @@ jobs: steps: - uses: arduino/report-size-deltas@main ``` + +This must be used in conjunction with a workflow that runs the [`arduino/compile-sketches`](https://github.com/arduino/compile-sketches) action and uploads the resulting sketches report to a [workflow artifact](https://help.github.com/en/actions/configuring-and-managing-workflows/persisting-workflow-data-using-artifacts): +```yaml +on: [push, pull_request] +jobs: + compile: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: arduino/compile-sketches@main + with: + enable-deltas-report: true + - uses: actions/upload-artifact@v2 + with: + name: size-deltas-reports + path: size-deltas-reports +```