55 branches : [ main, master ]
66 paths :
77 - ' **.py'
8- - ' evals/**'
98 - ' stagehand/**'
10- - ' format.sh'
119 - ' pyproject.toml'
1210
1311jobs :
1614 steps :
1715 - name : Check out repository
1816 uses : actions/checkout@v4
19- with :
20- fetch-depth : 0
2117
2218 - name : Set up Python
2319 uses : actions/setup-python@v4
@@ -29,32 +25,17 @@ jobs:
2925 python -m pip install --upgrade pip
3026 pip install black isort ruff
3127
32- - name : Make format script executable
33- run : chmod +x ./format.sh
34-
35- - name : Check current formatting status
28+ - name : Check Black formatting
29+ run : |
30+ echo "Checking Black formatting..."
31+ black --check --diff stagehand
32+
33+ - name : Check import sorting
3634 run : |
37- echo "Checking current code formatting..."
38- # Create a backup of current state
39- git stash push -m "backup before format check"
35+ echo "Checking import sorting..."
36+ isort --check-only --diff stagehand
4037
41- - name : Run format script
42- run : ./format.sh
43-
44- - name : Check for formatting changes
38+ - name : Run Ruff linting
4539 run : |
46- if git diff --quiet; then
47- echo "✅ Code is properly formatted!"
48- exit 0
49- else
50- echo "❌ Code formatting issues detected!"
51- echo ""
52- echo "The following files need formatting:"
53- git diff --name-only
54- echo ""
55- echo "Please run './format.sh' locally and commit the changes."
56- echo ""
57- echo "Detailed changes:"
58- git diff
59- exit 1
60- fi
40+ echo "Running Ruff linting..."
41+ ruff check stagehand
0 commit comments