File tree Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Expand file tree Collapse file tree 1 file changed +54
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Ruff Lint & Format
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+ pull_request :
7+ branches : [ master ]
8+
9+ permissions :
10+ contents : write
11+
12+ jobs :
13+ ruff :
14+ runs-on : ubuntu-latest
15+
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v4
19+ with :
20+ token : ${{ secrets.GITHUB_TOKEN }}
21+ fetch-depth : 0
22+
23+ - name : Set up Python
24+ uses : actions/setup-python@v5
25+ with :
26+ python-version : ' 3.13'
27+
28+ - name : Install UV
29+ run : |
30+ curl -LsSf https://astral.sh/uv/install.sh | sh
31+ echo "$HOME/.local/bin" >> $GITHUB_PATH
32+
33+ - name : Install dependencies
34+ run : uv sync
35+
36+ - name : Run Ruff Check
37+ uses : astral-sh/ruff-action@v3
38+ with :
39+ args : " check --fix --target-version=py313"
40+ src : " ./tgbot ./infrastructure"
41+
42+ - name : Run Ruff Format
43+ uses : astral-sh/ruff-action@v3
44+ with :
45+ args : " format --target-version=py313"
46+ src : " ./tgbot ./infrastructure"
47+
48+ - name : Commit and push changes
49+ uses : stefanzweifel/git-auto-commit-action@v5
50+ with :
51+ commit_message : " style: auto-fix Ruff issues 🪶"
52+ file_pattern : " tgbot/ infrastructure/ *.py"
53+ commit_user_name : " ruff-bot[bot]"
54+ commit_user_email : " ruff-bot[bot]@users.noreply.github.com"
You can’t perform that action at this time.
0 commit comments