Files
deskflow/.github/workflows/lint-source-code.yml
Nick Bolton c30fbf9002 Use .venv dir for as Python venv and cache (#7485)
* 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
2024-09-06 13:50:59 +01:00

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