[MAIN] add ruff for autoformatting #3
Workflow file for this run
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 formatting | |
on: | |
# workflow_dispatch: | |
# schedule: | |
# - cron: "0 12 * * 0" # Weekly at noon UTC on Sundays | |
pull_request: | |
branches: | |
- master | |
types: | |
- opened | |
- reopened | |
- synchronize | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Check with Ruff | |
uses: chartboost/ruff-action@v1 | |
with: | |
args: 'format --check elephant/elephant' | |
- name: Fix with Ruff | |
uses: chartboost/ruff-action@v1 | |
with: | |
args: 'format --fix elephant/elephant' | |
- name: Create PR | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
commit-message: ruff formatting | |
title: Ruff formatting | |
body: Reformatting code with ruff | |
branch: ruff-formatting |