* b2fe7ba6b1 Do not use return in finally * b4f3088535 Ensure directories exist before running sync scripts * e83e7036b0 mkosi-obs: also allow enrolling additional certs in KEK * b6432fbc29 initrd: Copy /etc/pki/rpm-gpg into sandbox tree * 44b96b93c8 Partially revert "resources: add systemd-boot-efi" * 7a22260179 Check that keys are both in context.cli and history * 6570b21a4b fix: Remove `erofs-utils` from initrd * ff61c5022a mkosi-initrd: Add atkbd and i8042 modules to the default initrd modules * eaa37f7c6c Generate initrds outside of umask context manager * de09209520 ci: Drop differential shellcheck * d07c6b93c9 build(deps): bump github/codeql-action from 3.28.16 to 3.28.18 * 9a12fb1bef Check that commit exists in config_parse_minimum_version() * 9e5b4f8932 kmod: factor out comparison and also count empty directories as invalid * 39ed5ef6c2 apt: support including additional configuration for reprepro
78 lines
2.7 KiB
YAML
78 lines
2.7 KiB
YAML
---
|
|
# vi: ts=2 sw=2 et:
|
|
# SPDX-License-Identifier: LGPL-2.1-or-later
|
|
# https://github.com/marketplace/actions/super-linter
|
|
name: Lint Code Base
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
- v[0-9]+-stable
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
build:
|
|
name: Lint Code Base
|
|
runs-on: ubuntu-24.04
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
steps:
|
|
- name: Repo checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
|
with:
|
|
# We need a full repo clone
|
|
fetch-depth: 0
|
|
|
|
- name: Lint Code Base
|
|
uses: super-linter/super-linter/slim@12150456a73e248bdc94d0794898f94e23127c88
|
|
env:
|
|
DEFAULT_BRANCH: main
|
|
MULTI_STATUS: false
|
|
VALIDATE_ALL_CODEBASE: false
|
|
VALIDATE_GITHUB_ACTIONS: true
|
|
|
|
- uses: systemd/mkosi@0d1143150835b21c1bfe64428df5f45b558280b1
|
|
|
|
- name: Check that tabs are not used in Python code
|
|
run: sh -c '! git grep -P "\\t" -- src/boot/generate-hwids-section.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py'
|
|
|
|
- name: Build tools tree
|
|
run: |
|
|
tee mkosi/mkosi.local.conf <<EOF
|
|
[Build]
|
|
ToolsTreeDistribution=fedora
|
|
ToolsTreeRelease=rawhide
|
|
EOF
|
|
|
|
mkosi -f sandbox -- true
|
|
|
|
- name: Run mypy
|
|
run: |
|
|
mkosi sandbox -- mypy --version
|
|
mkosi sandbox -- mypy src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py
|
|
|
|
- name: Run ruff check
|
|
run: |
|
|
mkosi sandbox -- ruff --version
|
|
mkosi sandbox -- ruff check src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py
|
|
|
|
- name: Run ruff format
|
|
run: |
|
|
mkosi sandbox -- ruff --version
|
|
if ! mkosi sandbox -- ruff format --check src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py
|
|
then
|
|
echo "Please run 'ruff format' on the above files or apply the diffs below manually"
|
|
mkosi sandbox -- ruff format --check --quiet --diff src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-tests/integration-test-wrapper.py
|
|
fi
|
|
|
|
- name: Configure meson
|
|
run: mkosi sandbox -- env CC=clang CXX=clang++ meson setup -Dlocalegen-path=/usr/bin/locale-gen -Dcompat-mutable-uid-boundaries=true build
|
|
|
|
- name: Run clang-tidy
|
|
run: mkosi sandbox -- meson test -C build --suite=clang-tidy --print-errorlogs --no-stdsplit
|