* Use .venv as Python venv dir * Update refs to Python venv dir and use action to cache and setup * Add missing shell: bash * Source for Python deps * Exclude .venv from lint * Update ChangeLog * Add cache-key arg for init-python * Add missing " * Use workflow specific Python cache names * Fixed cache key for Linux * Use bash if to make output clearer in case of skipping. * Clearer debug output * Add check for cache key * Add missing shell * Add SonarCloud and Valgrind venv cache * Fixed typo
38 lines
776 B
YAML
38 lines
776 B
YAML
# Lints CMake config and C++ source code.
|
|
|
|
name: "Lint source code"
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
- ready_for_review
|
|
|
|
jobs:
|
|
lint-source-code:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 5
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Python venv
|
|
uses: ./.github/actions/init-python
|
|
with:
|
|
cache-key: "lint-source-code"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
source .venv/bin/activate
|
|
pip install pyyaml cmake_format clang_format
|
|
|
|
- name: Linting with CMake formatter
|
|
run: ./scripts/lint_cmake.py
|
|
|
|
- name: Linting with Clang format
|
|
run: ./scripts/lint_clang.py
|