Skip to content

Commit

Permalink
Add Ruff formatting action
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamtaranto committed Dec 25, 2024
1 parent bbb9dd9 commit b9d1e72
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Ruff Formatting
on: [pull_request]
jobs:
ruff:
if: ${{ github.actor != 'dependabot[bot]' }} # Do not run on commits created by dependabot
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push the changed files.
contents: write # Allows reading and writing repository contents (e.g., commits)
pull-requests: write # Allows reading and writing pull requests
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
- uses: chartboost/ruff-action@v1
with:
src: './jcvi ./tests'
args: 'format --target-version py310'
- uses: stefanzweifel/git-auto-commit-action@v5
id: auto-commit-action
with:
commit_message: 'Style fixes by Ruff'

0 comments on commit b9d1e72

Please sign in to comment.