Skip to content

Commit

Permalink
chore: add ruff action
Browse files Browse the repository at this point in the history
  • Loading branch information
hhk7734 committed Aug 21, 2024
1 parent e0c212c commit f68aca3
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/ruff.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Ruff

on:
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ruff:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run Ruff
run: |
ruff check --output-format=github **/*.py
ruff format --check **/*.py \
|| (echo "Run 'ruff format' to fix the issues" && exit 1)

0 comments on commit f68aca3

Please sign in to comment.