diff --git a/.github/workflows/compile-sketches.yml b/.github/workflows/ci.yml similarity index 58% rename from .github/workflows/compile-sketches.yml rename to .github/workflows/ci.yml index 0a17abf..deea5c0 100644 --- a/.github/workflows/compile-sketches.yml +++ b/.github/workflows/ci.yml @@ -1,19 +1,32 @@ -name: Compile Sketches +name: CI on: pull_request: paths-ignore: - "**" - - "!.github/workflows/compile-sketches.ya?ml" + - "!.github/workflows/ci.ya?ml" - "!**.ino" push: paths-ignore: - "**" - - "!.github/workflows/compile-sketches.ya?ml" + - "!.github/workflows/ci.ya?ml" - "!**.ino" jobs: + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Lint sketches + uses: arduino/arduino-lint-action@v1 + with: + path: sketch + build: name: Build runs-on: ubuntu-latest @@ -29,4 +42,4 @@ jobs: fqbn: "arduino:avr:nano" sketch-paths: sketch github-token: ${{ secrets.GITHUB_TOKEN }} - enable-warnings-report: true \ No newline at end of file + enable-warnings-report: true diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml deleted file mode 100644 index 516b348..0000000 --- a/.github/workflows/lint.yml +++ /dev/null @@ -1,23 +0,0 @@ -name: Lint - -on: - pull_request: - paths-ignore: - - "**" - - "!.github/workflows/lint.ya?ml" - - "!**.ino" - - push: - paths-ignore: - - "**" - - "!.github/workflows/lint.ya?ml" - - "!**.ino" - -jobs: - lint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - uses: arduino/arduino-lint-action@v1 - with: - path: sketch diff --git a/README.md b/README.md index 27ec2de..569dbf3 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/RyanLua/Arduino-Plant-Watering-Kit/tree/codespaces?quickstart=1) -[![Lint](https://github.com/RyanLua/Arduino-Plant-Watering-Kit/actions/workflows/lint.yml/badge.svg)](https://github.com/RyanLua/Arduino-Plant-Watering-Kit/actions/workflows/lint.yml) [![Codespaces Prebuilds](https://github.com/RyanLua/Arduino-Plant-Watering-Kit/actions/workflows/codespaces/create_codespaces_prebuilds/badge.svg)](https://github.com/RyanLua/Arduino-Plant-Watering-Kit/actions/workflows/codespaces/create_codespaces_prebuilds) [![Sync Labels](https://github.com/RyanLua/Arduino-Plant-Watering-Kit/actions/workflows/sync-labels.yml/badge.svg)](https://github.com/RyanLua/Arduino-Plant-Watering-Kit/actions/workflows/sync-labels.yml) [![Compile Sketches](https://github.com/RyanLua/Arduino-Plant-Watering-Kit/actions/workflows/compile-sketches.yml/badge.svg)](https://github.com/RyanLua/Arduino-Plant-Watering-Kit/actions/workflows/compile-sketches.yml) +[![CI](https://github.com/RyanLua/Arduino-Plant-Watering-Kit/actions/workflows/ci.yml/badge.svg)](https://github.com/RyanLua/Arduino-Plant-Watering-Kit/actions/workflows/ci.yml) [![Codespaces Prebuilds](https://github.com/RyanLua/Arduino-Plant-Watering-Kit/actions/workflows/codespaces/create_codespaces_prebuilds/badge.svg)](https://github.com/RyanLua/Arduino-Plant-Watering-Kit/actions/workflows/codespaces/create_codespaces_prebuilds) [![Sync Labels](https://github.com/RyanLua/Arduino-Plant-Watering-Kit/actions/workflows/sync-labels.yml/badge.svg)](https://github.com/RyanLua/Arduino-Plant-Watering-Kit/actions/workflows/sync-labels.yml) > Build a smart garden setup with the Nano RP2040 Connect, a pump, and a moisture sensor.