Skip to content

Use correct syntax for empty YAML sequence #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/test-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
libraries: |
# The official Servo library is not compatible with ESP8266, but that platform has a bundled Servo lib
# so there are no library dependencies
-
[]

steps:
- name: Checkout
Expand Down Expand Up @@ -348,7 +348,7 @@ jobs:
fqbn: arduino:avr:uno
github-token: ${{ secrets.GITHUB_TOKEN }}
libraries: |
-
[]
sketch-paths: |
- ${{ env.TESTDATA_SKETCHES_PATH }}/Error

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![Check Action Metadata status](https://github.com/arduino/compile-sketches/actions/workflows/check-action-metadata-task.yml/badge.svg)](https://github.com/arduino/compile-sketches/actions/workflows/check-action-metadata-task.yml)
[![Check Files status](https://github.com/arduino/compile-sketches/actions/workflows/check-files-task.yml/badge.svg)](https://github.com/arduino/compile-sketches/actions/workflows/check-files-task.yml)
[![Check General Formatting status](https://github.com/arduino/compile-sketches/actions/workflows/check-general-formatting-task.yml/badge.svg)](https://github.com/arduino/compile-sketches/actions/workflows/check-general-formatting-task.yml)
[![Check License status](https://github.com/arduino/compile-sketches/actions/workflows/check-license.yml/badge.svg)](https://github.com/arduino/compile-sketches/actions/workflows/check-license.ym
[![Check License status](https://github.com/arduino/compile-sketches/actions/workflows/check-license.yml/badge.svg)](https://github.com/arduino/compile-sketches/actions/workflows/check-license.yml)
[![Check Markdown status](https://github.com/arduino/compile-sketches/actions/workflows/check-markdown-task.yml/badge.svg)](https://github.com/arduino/compile-sketches/actions/workflows/check-markdown-task.yml)
[![Check npm status](https://github.com/arduino/compile-sketches/actions/workflows/check-npm-task.yml/badge.svg)](https://github.com/arduino/compile-sketches/actions/workflows/check-npm-task.yml)
[![Check Prettier Formatting status](https://github.com/arduino/compile-sketches/actions/workflows/check-prettier-formatting-task.yml/badge.svg)](https://github.com/arduino/compile-sketches/actions/workflows/check-prettier-formatting-task.yml)
Expand Down Expand Up @@ -129,7 +129,7 @@ Keys:
[YAML](https://en.wikipedia.org/wiki/YAML)-format list of library dependencies to install.

**Default**: `"- source-path: ./"`
This causes the repository to be installed as a library. If there are no library dependencies and you want to override the default, set the `libraries` input to an empty list (`- libraries: '-'`).
This causes the repository to be installed as a library. If there are no library dependencies and you want to override the default, set the `libraries` input to an empty list (`- libraries: '[]'`).

Libraries are installed under the Arduino user folder at `~/Arduino/libraries`.

Expand Down
40 changes: 28 additions & 12 deletions action.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,64 @@
name: "Compile Arduino Sketches"
description: "Checks whether Arduino sketches will compile and produces a report of data from the compilations"
description: >-
Checks whether Arduino sketches will compile and produces a report of data from the compilations
inputs:
cli-version:
description: "Version of Arduino CLI to use when building"
description: >-
Version of Arduino CLI to use when building
default: "latest"
required: true
fqbn:
description: "Full qualified board name, with Boards Manager URL if needed"
description: >-
Full qualified board name, with Boards Manager URL if needed
default: "arduino:avr:uno"
required: true
libraries:
description: "YAML-format list of library dependencies to install"
description: >-
YAML-format list of library dependencies to install
default: "- source-path: ./"
required: true
platforms:
description: "YAML-format list of platform dependencies to install"
description: >-
YAML-format list of platform dependencies to install
default: ""
required: true
sketch-paths:
description: "YAML-format list of paths containing sketches to compile."
description: >-
YAML-format list of paths containing sketches to compile.
default: "- examples"
required: true
cli-compile-flags:
description: "YAML-format list of flags to add to the Arduino CLI sketch compilation command."
description: >-
YAML-format list of flags to add to the Arduino CLI sketch compilation command.
default: ""
required: false
verbose:
description: "Set to true to show verbose output in the log"
description: >-
Set to true to show verbose output in the log
default: "false"
required: true
sketches-report-path:
description: "Path in which to save a JSON formatted file containing data from the sketch compilations"
description: >-
Path in which to save a JSON formatted file containing data from the sketch compilations
default: "sketches-reports"
required: true
github-token:
description: "GitHub access token used to get information from the GitHub API. Only needed if you are using the deltas report feature in a private repository."
description: >-
GitHub access token used to get information from the GitHub API.

Only needed if you are using the deltas report feature in a private repository.
default: ""
required: true
enable-deltas-report:
description: "Set to true to cause the action to determine the change in memory usage and compiler warnings of the compiled sketches between the head and base refs of a PR and the immediate parent commit of a push"
description: >-
Set to true to cause the action to determine the change in memory usage and compiler warnings of the compiled
sketches between the head and base refs of a PR and the immediate parent commit of a push
default: "false"
required: true
enable-warnings-report:
description: "Set to true to cause the action to record the compiler warning count for each sketch compilation in the sketches report"
description: >-
Set to true to cause the action to record the compiler warning count for each sketch compilation in the sketches
report
default: "false"
required: true

Expand Down
1 change: 1 addition & 0 deletions compilesketches/tests/test_compilesketches.py
Original file line number Diff line number Diff line change
Expand Up @@ -1070,6 +1070,7 @@ def __init__(self):
[],
),
("-", [], [], [], []),
("[]", [], [], [], []),
(
"- " + compilesketches.CompileSketches.dependency_name_key + ": foo",
[{compilesketches.CompileSketches.dependency_name_key: "foo"}],
Expand Down