forked from LMGNU/llm.cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (42 loc) · 1.22 KB
/
Copy pathtest.yml
File metadata and controls
54 lines (42 loc) · 1.22 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
52
53
54
name: Code Style & Linting
on:
push:
branches: [ master, main, develop ]
pull_request:
branches: [ master, main, develop ]
jobs:
cpp-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install clang-format
run: |
sudo apt-get update
sudo apt-get install -y clang-format
- name: Check C++ code formatting
run: |
find . -name "*.cpp" -o -name "*.h" -o -name "*.hpp" | grep -v build | xargs clang-format --dry-run --Werror
continue-on-error: true
python-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install style checkers
run: |
pip install black isort flake8 pylint
- name: Check Python formatting with black
run: |
black --check . || true
continue-on-error: true
- name: Check import sorting
run: |
isort --check-only . || true
continue-on-error: true
- name: Lint Python code
run: |
pylint **/*.py --exit-zero
continue-on-error: true