podman-compose/.github/workflows/pylint.yml

42 lines
1.0 KiB
YAML
Raw Normal View History

2022-02-25 19:39:10 +01:00
name: Pylint
2022-02-25 19:50:52 +01:00
on:
- push
- pull_request
2022-02-25 19:39:10 +01:00
jobs:
lint-black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install psf/black requirements
run: |
sudo apt-get update
sudo apt-get install -y python3 python3-venv
- uses: psf/black@stable
with:
options: "--check --verbose"
version: "~= 23.3"
lint-pylint:
2022-02-25 19:39:10 +01:00
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
2022-02-25 19:39:10 +01:00
steps:
- uses: actions/checkout@v3
2022-02-25 19:39:10 +01:00
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
2022-02-25 19:39:10 +01:00
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
2022-02-25 19:42:32 +01:00
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
2022-02-25 19:39:10 +01:00
pip install pylint
- name: Analysing the code with pylint
run: |
2022-02-25 19:50:52 +01:00
python -m compileall podman_compose.py
2022-02-25 19:42:32 +01:00
pylint podman_compose.py
2022-02-25 21:59:15 +01:00
# pylint $(git ls-files '*.py')