* 60ed8c964f ubuntu: Don't treat linux-tools-xxx as a kernel package * 24e5e532ab obs: enable PR CI workflow * 5edcd2c5ca action: skip install of unavailable packages * 4c18bc115b sandbox: Make seccomp work on alternative arches * a91c8730e2 tests: Mark install tests and run them separately * 923f72ea63 Fix linter unit tests at package build time * 3f4bee3392 tests: Avoid leading underscore in helper function * b2f04776c4 docs: Document debugging of failed sandbox commands * 461a1dd290 run: Show complete sandbox command, factor out its logging * d74c0b03d9 Don't add El Torito boot catalog for BIOS/grub images by default * b0f9525c2c tests: Move unit tests from GitHub workflow into pytest * 2889b5599b run: Add `cwd` kwarg to run()/spawn() * 3f7de100b8 sandbox: Fix pyright "possibly unbound variable" errors * 4cb9f337e2 gitignore: Add generated man pages and zipapp builddir * 49c1c78f3f pytest: Restrict discovery to tests/ * a9d7ab5e64 finalize_scripts: tighten the PATH-strip condition to actual self-exec * 145f4c259b sandbox: Add --debug option * df43e4007d Mount /etc/resolv.conf symlink into sandbox
90 lines
2.9 KiB
YAML
90 lines
2.9 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd
|
|
with:
|
|
# We need a full repo clone
|
|
fetch-depth: 0
|
|
persist-credentials: false
|
|
|
|
- name: Lint Code Base
|
|
uses: super-linter/super-linter/slim@9e863354e3ff62e0727d37183162c4a88873df41
|
|
env:
|
|
DEFAULT_BRANCH: main
|
|
MULTI_STATUS: false
|
|
VALIDATE_ALL_CODEBASE: false
|
|
VALIDATE_GITHUB_ACTIONS: true
|
|
LINTER_RULES_PATH: .github/linters
|
|
GITHUB_ACTIONS_CONFIG_FILE: actionlint.yml
|
|
ENABLE_GITHUB_PULL_REQUEST_SUMMARY_COMMENT: false
|
|
|
|
- uses: systemd/mkosi@60ed8c964f8d98aa4b325f381c4b3bc6de91a0b7
|
|
|
|
- name: Check that tabs are not used in Python code
|
|
run: sh -c '! git grep -P "\\t" -- src/core/generate-bpf-delegate-configs.py 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 box -- true
|
|
|
|
- name: Run mypy
|
|
run: |
|
|
mkosi box -- mypy --version
|
|
mkosi box -- mypy src/core/generate-bpf-delegate-configs.py 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 box -- ruff --version
|
|
if ! mkosi box -- ruff format --check
|
|
then
|
|
echo "Please run 'ruff format' on the above files or apply the diffs below manually"
|
|
mkosi box -- ruff format --check --quiet --diff
|
|
fi
|
|
|
|
- name: Run ruff check
|
|
run: |
|
|
mkosi box -- ruff --version
|
|
if ! mkosi box -- ruff check
|
|
then
|
|
echo "Please fix the errors shown by 'ruff check' on the above files or add noqa comments where appropriate."
|
|
echo "Diffs for fixes that can be programmatically generated are shown below:"
|
|
mkosi box -- ruff check --diff
|
|
fi
|
|
|
|
- name: Configure meson
|
|
run: mkosi box -- env CC=clang CXX=clang++ meson setup build
|
|
|
|
- name: Run clang-tidy
|
|
run: mkosi box -- meson test -C build --suite=clang-tidy --print-errorlogs --no-stdsplit --quiet
|
|
|
|
- name: Run coccinelle checks
|
|
run: mkosi box -- meson test -C build --suite=coccinelle --print-errorlogs --no-stdsplit
|