Doc updates #147
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] | |
| jobs: | |
| frontend-lint: | |
| name: Frontend (ESLint + Prettier) | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: interface | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| cache: 'npm' | |
| cache-dependency-path: interface/package-lock.json | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Generate SvelteKit types | |
| run: npx svelte-kit sync | |
| - name: Lint | |
| run: npm run lint | |
| - name: Unit tests | |
| run: npm run test | |
| iwyu: | |
| name: IWYU (Include What You Use) | |
| runs-on: ubuntu-latest | |
| continue-on-error: true # informational only — never blocks CI | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install IWYU | |
| run: sudo apt-get install -y iwyu | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install PlatformIO | |
| run: pip install platformio | |
| - name: Install native dependencies | |
| run: pio pkg install -e native | |
| - name: Run IWYU analysis | |
| run: python3 ci/iwyu.py | |
| backend-lint: | |
| name: Backend (cppcheck + cpp_lint) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run custom lint rules | |
| run: python3 ci/cpp_lint.py | |
| - name: Install cppcheck | |
| run: sudo apt-get install -y cppcheck | |
| - name: Run cppcheck | |
| run: | | |
| cppcheck \ | |
| --enable=warning,performance,style \ | |
| --suppress=missingInclude \ | |
| --suppress=missingIncludeSystem \ | |
| --inline-suppr \ | |
| --language=c++ \ | |
| --std=c++20 \ | |
| --error-exitcode=1 \ | |
| -DPLATFORMIO=1 \ | |
| -DFT_MOONLIGHT=1 \ | |
| -DFT_MOONBASE=1 \ | |
| "-DFT_ENABLED(x)=x" \ | |
| --suppress=noExplicitConstructor \ | |
| --suppress=functionStatic \ | |
| --suppress=constParameterReference \ | |
| --suppress=constParameterPointer \ | |
| --suppress=constParameterCallback \ | |
| --suppress=constVariablePointer \ | |
| --suppress=constVariableReference \ | |
| --suppress=constVariable \ | |
| --suppress=cstyleCast \ | |
| --suppress=unusedStructMember \ | |
| --suppress=useStlAlgorithm \ | |
| --suppress=variableScope \ | |
| --suppress=shadowVariable \ | |
| --suppress=shadowArgument \ | |
| --suppress=stlFindInsert \ | |
| --suppress=noConstructor \ | |
| --template="{file}:{line}: {severity}: {message} [{id}]" \ | |
| $(find src \( -name "*.cpp" -o -name "*.h" \) ! -path "*moonmanpng*" -print) | |
| backend-tests: | |
| name: Backend Unit Tests (doctest) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install PlatformIO | |
| run: pip install platformio | |
| - name: Install native dependencies | |
| run: pio pkg install -e native | |
| - name: Run native tests | |
| run: pio test -e native |