forked from agentscope-ai/QwenPaw
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (34 loc) · 1.09 KB
/
pre-commit.yml
File metadata and controls
41 lines (34 loc) · 1.09 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
name: Pre-commit Checks
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
strategy:
fail-fast: true
env:
OS: ubuntu-latest
PYTHON: "3.10"
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Update setuptools and wheel
run: |
pip install setuptools==68.2.2 wheel==0.41.2
- name: Install CoPaw with dev dependencies
run: |
pip install -q -e ".[dev]"
- name: Install pre-commit hooks
run: |
pre-commit install
- name: Run pre-commit
run: |
pre-commit run --all-files > pre-commit.log 2>&1 || true
cat pre-commit.log
if grep -q Failed pre-commit.log; then
echo -e "\e[41m [**FAIL**] pre-commit checks failed. Run 'pre-commit run --all-files' locally, commit any auto-fixes, then push again. \e[0m"
exit 1
fi
echo -e "\e[46m ********************************Passed******************************** \e[0m"