forked from rook/rook
The yamllint make target required yamllint to be installed in the PATH. This change renders it self-contained by using a container image instead. Signed-off-by: Michael Adam <obnox@samba.org> Co-authored-by: Blaine Gardner <b.blaine.gardner@gmail.com>
57 lines
1.3 KiB
YAML
57 lines
1.3 KiB
YAML
name: Linters
|
|
on:
|
|
push:
|
|
tags:
|
|
- v*
|
|
branches:
|
|
- master
|
|
- release-*
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- release-*
|
|
|
|
# cancel the in-progress workflow when PR is refreshed.
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
yaml-linter:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Lint YAML files
|
|
run: make yamllint
|
|
|
|
pylint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
|
with:
|
|
python-version: 3.12
|
|
|
|
- name: Install pylint and requirements
|
|
run: |
|
|
pip install pylint
|
|
pip install pylint --upgrade
|
|
pip install requests
|
|
pip install pygit2
|
|
|
|
- name: Lint Python files
|
|
run: make pylint
|
|
|
|
- name: Setup black for py
|
|
uses: psf/black@c6755bb741b6481d6b3d3bb563c83fa060db96c9 # stable
|