Skip to content

messed up import order #7

messed up import order

messed up import order #7

Workflow file for this run

name: Ruff Checks
on:
pull_request:
branches:
- "**" # Run on all branches for pull requests
jobs:
ruff_checks:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x" # Specify the Python version you are using
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Ruff check (I violations)
run: ruff check . --select I
- name: Run Ruff formatting check
run: ruff format --check
- name: Run full Ruff check
run: ruff check .
- name: Set workflow status
run: |
if [[ $(ruff --exit-code . | wc -l) -gt 0 ]]; then
echo "Ruff found errors. Setting workflow status to failure."
echo ::set-output name=status::failure
else
echo "Ruff passed. Setting workflow status to success."
echo ::set-output name=status::success
fi
- name: Check workflow status
run: |
if [[ $(echo "${{ steps.ruff_checks.outputs.status }}") != "success" ]]; then
echo "Workflow failed. Blocking merge."
exit 1
fi