-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (44 loc) · 1.32 KB
/
verify.yml
File metadata and controls
51 lines (44 loc) · 1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Verify Codebase
on:
push:
branches: [ main ]
pull_request:
jobs:
validate:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
token: ${{ secrets.BOT_GITHUB_TOKEN }}
fetch-depth: 0
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install Dependencies
run: |
pip install ruff mypy pytest
pip install -e .
pip install types-requests types-chardet
- name: 🪄 Auto-Fix Linting & Formatting
run: |
ruff check --fix src/ tests/
ruff format src/ tests/
- name: 🚀 Commit & Push Fixes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "🪄 PyOB: Automated Lint & Format Fixes"
commit_user_name: "pyob-bot"
commit_user_email: "pyob-bot@users.noreply.github.com"
# YOU MUST PASS THE TOKEN HERE
file_pattern: '.'
env:
# This is required for the git-auto-commit-action to have push rights
GITHUB_TOKEN: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: Run PyOB Validation Suite
run: |
chmod +x check.sh
./check.sh --fix