Fixed typos in lint.yaml #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Lint and Format | ||
on: | ||
pull_request: | ||
push: | ||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 # Update to latest version | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
cache: 'pip' # Optional: Enable pip caching | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install pylint black isort # Add isort for import sorting | ||
- name: Run Pylint | ||
run: | | ||
pylint $(git ls-files '*.py') | tee pylint-report.txt | ||
continue-on-error: true # Allow workflow to continue if Pylint finds issues | ||
- name: Run Black Formatter | ||
run: black --check --diff $(git ls-files '*.py') | ||
- name: Run isort | ||
run: isort --check --diff $(git ls-files '*.py') | ||
- name: Upload Pylint Report | ||
uses: actions/upload-artifact@v4 # Update to latest version | ||
with: | ||
name: pylint-report-${{ matrix.python-version }} | ||
path: pylint-report.txt | ||
retention-days: 5 # Optional: Set artifact retention |