feat: ruff pythonlinting #1
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: Ruff AutoFix and Python Lint | |
on: | |
push: | |
branches: | |
- ruff-autofix | |
#on: | |
# pull_request: | |
# branches: | |
# - main | |
jobs: | |
# autofix: | |
# runs-on: ubuntu-latest | |
# | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v2 | |
# | |
# - name: Setup Node.js | |
# uses: actions/setup-node@v2 | |
# with: | |
# node-version: '14' | |
# | |
# - name: Install dependencies | |
# run: npm ci | |
# | |
# - name: Run Ruff AutoFix | |
# run: npx ruff autofix | |
# | |
# - name: Commit changes | |
# run: | | |
# git config --local user.email "[email protected]" | |
# git config --local user.name "GitHub Action" | |
# git commit -am "Run Ruff AutoFix" || echo "No changes to commit" | |
# git push | |
python-lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.8' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install flake8 | |
- name: Run flake8 Lint | |
run: flake8 . |