Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter) from 7.1.0 to 7.2.1. - [Release notes](https://github.com/super-linter/super-linter/releases) - [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md) - [Commits](https://github.com/super-linter/super-linter/compare/b92721f792f381cedc002ecdbb9847a15ece5bb8...85f7611e0f7b53c8573cca84aa0ed4344f6f6a4d) --- updated-dependencies: - dependency-name: super-linter/super-linter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
65 lines
2.2 KiB
YAML
65 lines
2.2 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@85f7611e0f7b53c8573cca84aa0ed4344f6f6a4d
|
|
env:
|
|
DEFAULT_BRANCH: main
|
|
MULTI_STATUS: false
|
|
VALIDATE_ALL_CODEBASE: false
|
|
VALIDATE_GITHUB_ACTIONS: true
|
|
|
|
- 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-test-wrapper.py'
|
|
|
|
- name: Install ruff and mypy
|
|
run: |
|
|
python3 -m pip install --break-system-packages --upgrade setuptools wheel pip
|
|
python3 -m pip install --break-system-packages mypy types-Pillow ruff
|
|
|
|
- name: Run mypy
|
|
run: |
|
|
python3 -m mypy --version
|
|
python3 -m mypy src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-test-wrapper.py
|
|
|
|
- name: Run ruff check
|
|
run: |
|
|
ruff --version
|
|
ruff check src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-test-wrapper.py
|
|
|
|
- name: Run ruff format
|
|
run: |
|
|
ruff --version
|
|
if ! ruff format --check src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-test-wrapper.py
|
|
then
|
|
echo "Please run 'ruff format' on the above files or apply the diffs below manually"
|
|
ruff format --check --quiet --diff src/boot/generate-hwids-section.py src/test/generate-sym-test.py src/ukify/ukify.py test/integration-test-wrapper.py
|
|
fi
|