Skip to content

Update ci.yml

Update ci.yml #34

Workflow file for this run

name: CI
on:
push:
branches: [ main, second-branch ]
pull_request:
branches: [ main, second-branch ]
jobs:
lint:
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12.3"
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Auto-fix code with Ruff
run: |
ruff format . --fix --line-length 88 --exclude migrations,venv || true
- name: Run Ruff linter
run: |
ruff check . --select ALL --ignore F401,W391 --line-length 88