Fix formatting in Python workflow and update .gitignore to include Ansible files
This commit is contained in:
16
.github/workflows/python.yml
vendored
16
.github/workflows/python.yml
vendored
@@ -3,24 +3,24 @@ name: Python Lint Check
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
check-python:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
|
||||
|
||||
- name: Install Python linting tools
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install pylint black
|
||||
|
||||
|
||||
- name: Run pylint
|
||||
run: |
|
||||
python_files=$(find . -name "*.py" -type f)
|
||||
@@ -28,9 +28,9 @@ jobs:
|
||||
echo "No Python files found to lint"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
pylint $python_files
|
||||
|
||||
|
||||
pylint --exit-zero $python_files
|
||||
|
||||
- name: Check Black formatting
|
||||
run: |
|
||||
python_files=$(find . -name "*.py" -type f)
|
||||
@@ -38,5 +38,5 @@ jobs:
|
||||
echo "No Python files found to lint"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
black --check $python_files
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -1,2 +1,4 @@
|
||||
logs/*
|
||||
**/__pycache__/
|
||||
**/__pycache__/
|
||||
.ansible/
|
||||
.ansible/.lock
|
||||
|
||||
Reference in New Issue
Block a user