Skip to content

Commit

Permalink
Add Arduino, C++ and PR title linters
Browse files Browse the repository at this point in the history
  • Loading branch information
XavierBrassoud committed Feb 16, 2024
1 parent 0522279 commit 6720edb
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/lint_git.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: "Lint PR"

on:
pull_request_target:
types:
- opened
- edited
- synchronize

permissions:
pull-requests: read

jobs:
lint-git:
name: Validate PR title
runs-on: ubuntu-22.04
steps:
- uses: amannn/action-semantic-pull-request@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31 changes: 31 additions & 0 deletions .github/workflows/quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
name: Quality Gates

on:
push:
pull_request:
workflow_dispatch: # Allows to trigger the workflow manually in GitHub UI

jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
path:
- 'src'
- 'examples'
steps:
- uses: actions/checkout@v4

- name: arduino-lint
uses: arduino/arduino-lint-action@v1
with:
library-manager: update
compliance: strict

- uses: cpp-linter/cpp-linter-action@v2
with:
style: file
files-changed-only: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 6720edb

Please sign in to comment.