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:
|
2023-04-08 21:10:23 +02:00
|
|
|
lint-black:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Install psf/black requirements
|
|
|
|
run: |
|
2023-04-09 17:11:31 +02:00
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y python3 python3-venv
|
2023-04-08 21:10:23 +02:00
|
|
|
- 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.8", "3.9", "3.10"]
|
|
|
|
steps:
|
2022-10-17 17:15:57 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-02-25 19:39:10 +01:00
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2022-10-17 17:15:54 +02:00
|
|
|
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')
|