Add trunk linter #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Lint | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| checks: write | |
| jobs: | |
| trunk_check: | |
| name: Trunk Check | |
| runs-on: ubuntu-latest | |
| permissions: | |
| checks: write # For trunk to post annotations | |
| contents: read # For repo checkout | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Build with ESP-IDF | |
| uses: espressif/esp-idf-ci-action@v1 | |
| with: | |
| esp_idf_version: v5.5.2 | |
| target: esp32c6 | |
| - name: Fix compile_commands.json paths | |
| run: | | |
| # Replace Docker container paths with relative paths for trunk linter | |
| # Copy first since build/ has restricted permissions from Docker | |
| sed 's|/project/|./|g' build/compile_commands.json > compile_commands.json | |
| - name: Trunk Check | |
| uses: trunk-io/trunk-action@v1 |