arduino/arduino-lint-action

Add example of .yml when not using default options

Strooom opened this issue · 2 comments

Hi,

I got this action working, but the Arduino Lint produces a warning while the github action yields 'succes'.
I would like to adopt a strict compliance.

Tried with this piece of .yml - maybe it's not 100% correct.
Please provide a bit more documentation and more examples on how to configure the action for non-default settings. Thanks!

name: Arduino Library Checks
on: [push, pull_request]
jobs:
  ArduinoLintjob:
    name: Run Arduino Lint
    env:
      compliance: strict
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: arduino/arduino-lint-action@v1

Hi @Strooom. Thanks for your suggestion. I'll see if I can make the documentation more clear about this.

As for the specific problem you're having. The workflow you shared is setting an environment variable named "compliance" to the value "strict". That is not the same as using an action input. While environment variables can be useful for other purposes, arduino/arduino-lint-action does not use them at all so it completely ignores that environment variable.

The correct workflow to run the checks in strict compliance mode would look like this:

name: Arduino Library Checks
on: [push, pull_request]
jobs:
  ArduinoLintjob:
    name: Run Arduino Lint
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: arduino/arduino-lint-action@v1
        with:
          compliance: strict

Official documentation on setting action inputs here:
https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepswith

Thank you. With your help I got it working.
Next milestone is to get all my arduino libraries to pass strict compliance :-)