Skip to content

ci: 💚 fix codecov upload #6

ci: 💚 fix codecov upload

ci: 💚 fix codecov upload #6

Workflow file for this run

name: Code Formatting and Linting
on: [push, pull_request]
jobs:
format-lint:
runs-on: ubuntu-latest
outputs:
check_changes: ${{ steps.check_changes.outputs.check_changes }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff isort
- name: Run isort
run: isort .
- name: Run Ruff
run: ruff . --fix
- name: Check for changes
id: check_changes
run: echo check_changes=$(git status --porcelain) >> $GITHUB_OUTPUT
- name: Commit formatting fixes
if: steps.check_changes.outputs.check_changes == 'M'
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git commit -a -m "Auto-formatting and linting fixes [skip ci]"
git push origin master