Skip to content

Commit

Permalink
fix: update linting action
Browse files Browse the repository at this point in the history
  • Loading branch information
AngRodrigues committed Sep 24, 2024
1 parent 6a16cf5 commit cad4e2c
Showing 1 changed file with 26 additions and 18 deletions.
44 changes: 26 additions & 18 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,32 @@
on: [push, pull_request]
name: release-please
jobs:
# linting:
# name: Linting
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install black ruff
# - name: Autoformat with black
# run: |
# black .
# - name: Lint with ruff
# run: |
# ruff check LoopProjectFile --fix
# - uses: stefanzweifel/git-auto-commit-action@v5
# with:
# commit_message: "style: style fixes by ruff and autoformatting by black"
linting:
name: Linting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black ruff
- name: Autoformat with black
run: |
black .
- name: Lint with ruff
run: |
ruff check . --fix
- name: Check for local changes
run: |
if [ -n "$(git status --porcelain)" ]; then
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "style: style fixes by ruff and autoformatting by black"
fi
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "style: style fixes by ruff and autoformatting by black"

continuous-integration:
name: Continuous integration ${{ matrix.os }} python ${{ matrix.python-version }}
Expand Down

0 comments on commit cad4e2c

Please sign in to comment.