47 lines
1.0 KiB
YAML
47 lines
1.0 KiB
YAML
---
|
|
# DESCRIPTION: Github actions config
|
|
# SPDX-License-Identifier: LGPL-3.0-only OR Artistic-2.0
|
|
|
|
name: reusable-lint-py
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
env:
|
|
CI_OS_NAME: linux
|
|
CI_BUILD_STAGE_NAME: build
|
|
CI_RUNS_ON: ubuntu-22.04
|
|
CCACHE_COMPRESS: 1
|
|
CCACHE_DIR: ${{ github.workspace }}/.ccache
|
|
CCACHE_LIMIT_MULTIPLE: 0.95
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
working-directory: repo
|
|
|
|
jobs:
|
|
|
|
lint-py:
|
|
runs-on: ubuntu-22.04
|
|
name: Sub-lint | Python
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v5
|
|
with:
|
|
path: repo
|
|
|
|
- name: Install packages for build
|
|
run: ./ci/ci-install.bash
|
|
|
|
# We use specific version numbers, otherwise a Python package
|
|
# update may add a warning and break our build
|
|
- name: Install packages for lint
|
|
run: sudo pip3 install pylint==3.0.2 ruff==0.1.3 clang sphinx sphinx_rtd_theme sphinxcontrib-spelling breathe ruff
|
|
|
|
- name: Configure
|
|
run: autoconf && ./configure --enable-longtests --enable-ccwarn
|
|
|
|
- name: Lint
|
|
run: make -k lint-py
|