diff --git a/.github/workflows/check-arduino.yml b/.github/workflows/check-arduino.yml new file mode 100644 index 0000000..6ccd297 --- /dev/null +++ b/.github/workflows/check-arduino.yml @@ -0,0 +1,26 @@ +name: Check Arduino + +# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows +on: + push: + pull_request: + schedule: + # Run every Tuesday at 8 AM UTC to catch breakage caused by new rules added to Arduino Lint. + - cron: "0 8 * * TUE" + workflow_dispatch: + repository_dispatch: + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Arduino Lint + uses: arduino/arduino-lint-action@v1.0.2 + with: + compliance: specification + library-manager: update + project-type: library diff --git a/README.md b/README.md index ae1d832..0a9b62d 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ESP32RotaryEncoder -[![PlatformIO Registry](https://badges.registry.platformio.org/packages/maffooclock/library/ESP32RotaryEncoder.svg)](https://registry.platformio.org/libraries/maffooclock/ESP32RotaryEncoder) [![arduino-library-badge](https://www.ardu-badge.com/badge/ESP32RotaryEncoder.svg?)](https://www.ardu-badge.com/ESP32RotaryEncoder) [![License](https://img.shields.io/badge/license-MIT%20License-blue.svg)](http://doge.mit-license.org) +[![Arduino Lint](https://github.com/MaffooClock/ESP32RotaryEncoder/actions/workflows/check-arduino.yml/badge.svg)](https://github.com/MaffooClock/ESP32RotaryEncoder/actions/workflows/check-arduino.yml) [![Arduino Library](https://www.ardu-badge.com/badge/ESP32RotaryEncoder.svg?)](https://www.ardu-badge.com/ESP32RotaryEncoder) [![PlatformIO Registry](https://badges.registry.platformio.org/packages/maffooclock/library/ESP32RotaryEncoder.svg)](https://registry.platformio.org/libraries/maffooclock/ESP32RotaryEncoder) [![License](https://img.shields.io/badge/license-MIT%20License-blue.svg)](http://doge.mit-license.org) A simple Arduino library for implementing a rotary encoder on an ESP32 using interrupts and callbacks.