debian-forge/.github/workflows/check.yml
Tomáš Hozza e294f38d9c Tests: fix packit config validation
Packit changed the command to validate its configuration, without
keeping backward compatibility.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
2025-04-22 21:15:21 +02:00

92 lines
2.4 KiB
YAML

name: Checks
on: [pull_request, push]
permissions:
contents: read
jobs:
spelling_checker:
name: "Spelling"
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: codespell-project/actions-codespell@master
with:
ignore_words_list: msdos, pullrequest
skip: ./.git,coverity,rpmbuild,samples
python_code_linters:
name: "Python Linters"
runs-on: ubuntu-24.04
steps:
- name: "Clone Repository"
uses: actions/checkout@v4
- name: "Run Linters"
uses: osbuild/containers/src/actions/privdocker@552e30cf1b4ed19c6ddaa57f96c342b3dff4227b
with:
image: ghcr.io/osbuild/osbuild-ci:latest-202502250751
run: |
make lint
shell_linters:
name: "Shell Linters"
runs-on: ubuntu-24.04
steps:
- name: "Clone Repository"
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "Differential ShellCheck"
uses: redhat-plumbers-in-action/differential-shellcheck@v3
with:
severity: warning
token: ${{ secrets.GITHUB_TOKEN }}
packit-config-lint:
name: "📦 Packit config lint"
runs-on: ubuntu-24.04
container:
image: registry.fedoraproject.org/fedora:latest
steps:
- name: Install Packit
run: dnf -y install packit
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Validate Packit config
run: |
packit config validate .packit.yaml
snapshots:
name: "🔍 Check for valid snapshot urls"
runs-on: ubuntu-24.04
steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check for valid snapshot urls
run: ./tools/check-snapshots --errors-only .
json-fmt:
name: "🔍 Check JSON files for formatting consistency"
runs-on: ubuntu-24.04
steps:
- name: Install utils
run: |
sudo apt update
sudo apt install -y jq moreutils
- name: Check out code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Reformat all json files
run: find -iname "*.json" -print -exec sh -c 'jq --indent 2 . {} | sponge {}' \;
- name: Check diff
run: git diff --exit-code