mirror of
https://github.com/ben-grande/qusal.git
synced 2024-10-01 02:35:49 -04:00
224312ed42
Make shell a little bit safer with: - add-default-case - check-extra-masked-returns - check-set-e-suppressed - quote-safe-variables - check-unassigned-uppercase Although there are some stylistic decisions for uniformity: - avoid-nullary-conditions - deprecated-which - require-variable-braces
73 lines
2.1 KiB
YAML
73 lines
2.1 KiB
YAML
# yamllint disable-line rule:line-length
|
|
# SPDX-FileCopyrightText: 2023 - 2024 Benjamin Grande M. S. <ben.grande.b@gmail.com>
|
|
#
|
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
---
|
|
name: Lint
|
|
|
|
# yamllint disable-line rule:truthy
|
|
on:
|
|
# yamllint disable-line rule:empty-values
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
types:
|
|
- opened
|
|
- reopened
|
|
- synchronize
|
|
|
|
concurrency:
|
|
group: ci-${{ github.ref }}-1
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint:
|
|
strategy:
|
|
fail-fast: false
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: recursive
|
|
- uses: actions/setup-python@v5
|
|
- name: Update package list
|
|
run: sudo apt-get update -y
|
|
- name: Install OS packages
|
|
# yamllint disable-line rule:line-length
|
|
run: sudo apt-get install -y $(cat dependencies/debian.txt)
|
|
- name: Remove externally managed python environment flag
|
|
# yamllint disable-line rule:line-length
|
|
run: sudo dpkg-divert --rename --add /usr/lib/$(py3versions -d)/EXTERNALLY-MANAGED
|
|
- name: Install pip packages
|
|
run: pip3 install $(cat dependencies/pip.txt)
|
|
- uses: pre-commit/action@v3.0.1
|
|
env:
|
|
SPEC_VENDOR: Ben Grande
|
|
SPEC_PACKAGER: Ben Grande <ben.grande.b@gmail.com>
|
|
- uses: editorconfig-checker/action-editorconfig-checker@main
|
|
- name: Run Editorconfig Checker
|
|
run: |
|
|
editorconfig-checker
|
|
editorconfig-checker salt/dotfiles
|
|
- name: Lint commit messages
|
|
run: |
|
|
if test "${{ github.event_name}}" = "pull_request"
|
|
then
|
|
base="${{ github.event.pull_request.base.sha }}"
|
|
head="${{ github.event.pull_request.head.sha }}"
|
|
else
|
|
base="${{ github.event.before }}"
|
|
head="${{ github.event.after }}"
|
|
fi
|
|
if test "${base}" = "${head}" || test -z "${base}"
|
|
then
|
|
gitlint --debug --commit "${head}"
|
|
else
|
|
gitlint --debug --commits "${base}..${head}"
|
|
fi
|