From 52a4ec9ba989f5d95c725f711ffa81feee3f2cb2 Mon Sep 17 00:00:00 2001 From: Adam Taranto Date: Fri, 20 Sep 2024 13:35:26 +1000 Subject: [PATCH] Use Ruff for auto formatting (#42) * init Ruff github action * fix indentation * config git auto commit --- .github/ruff.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/ruff.yml diff --git a/.github/ruff.yml b/.github/ruff.yml new file mode 100644 index 0000000..1e6feff --- /dev/null +++ b/.github/ruff.yml @@ -0,0 +1,20 @@ +name: Ruff Formatting +on: [push, pull_request] +jobs: + ruff: + runs-on: ubuntu-latest + permissions: + # Give the default GITHUB_TOKEN write permission to commit and push the changed files. + contents: write + steps: + - uses: actions/checkout@v4 + with: + ref: ${{ github.head_ref }} + - uses: chartboost/ruff-action@v1 + with: + src: './src/python' + args: 'format --target-version py310' + - uses: stefanzweifel/git-auto-commit-action@v5 + id: auto-commit-action + with: + commit_message: 'Style fixes by Ruff'