Skip to content

Commit eb96987

Browse files
committed
Add an input to control log verbosity
The verbose output adds a lot of content to the log that is of no interest to the user under normal circumstances. This makes it difficult to read the log. The verbosity can now be controlled via the verbose input.
1 parent 60a4c47 commit eb96987

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ List of library dependencies to install (space separated). Default `""`.
2424

2525
List of paths containing sketches to compile. These paths will be searched recursively. Default `"examples"`.
2626

27+
### `verbose`
28+
29+
Set to true to show verbose output in the log. Default `false`
30+
2731
### `github-token`
2832

2933
GitHub access token used to get information from the GitHub API. Only needed if you're using the size report features with private repositories. It will be convenient to use [`${{ secrets.GITHUB_TOKEN }}`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token). Default `""`.

action.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ inputs:
1313
sketch-paths:
1414
description: 'List of paths containing sketches to compile.'
1515
default: 'examples'
16+
verbose:
17+
description: 'Set to true to show verbose output in the log'
18+
default: false
1619
github-token:
1720
description: 'GitHub access token used to get information from the GitHub API. Only needed if you are using the size report features with private repositories.'
1821
default: ''

compilesketches/compilesketches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def main():
2424
fqbn_arg=os.environ["INPUT_FQBN"],
2525
libraries=os.environ["INPUT_LIBRARIES"],
2626
sketch_paths=os.environ["INPUT_SKETCH-PATHS"],
27-
verbose="true",
27+
verbose=os.environ["INPUT_VERBOSE"],
2828
github_token=os.environ["INPUT_GITHUB-TOKEN"],
2929
report_sketch=os.environ["INPUT_SIZE-REPORT-SKETCH"],
3030
enable_size_deltas_report=os.environ["INPUT_ENABLE-SIZE-DELTAS-REPORT"],

compilesketches/tests/test_compilesketches.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ def compile_sketches(self):
7171
monkeypatch.setenv("INPUT_LIBRARIES", libraries)
7272
monkeypatch.setenv("INPUT_SKETCH-PATHS", sketch_paths)
7373
monkeypatch.setenv("INPUT_GITHUB-TOKEN", github_token)
74+
monkeypatch.setenv("INPUT_VERBOSE", verbose)
7475
monkeypatch.setenv("INPUT_SIZE-REPORT-SKETCH", report_sketch)
7576
monkeypatch.setenv("INPUT_ENABLE-SIZE-DELTAS-REPORT", enable_size_deltas_report)
7677
monkeypatch.setenv("INPUT_SIZE-DELTAS-REPORT-FOLDER-NAME", sketches_report_path)

0 commit comments

Comments
 (0)