File tree Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Expand file tree Collapse file tree 1 file changed +8
-9
lines changed Original file line number Diff line number Diff line change @@ -34,27 +34,26 @@ jobs:
34
34
- uses : actions/checkout@v4
35
35
with :
36
36
fetch-depth : 2
37
+
37
38
- name : Set up Python ${{ matrix.config.python-version }}
38
39
uses : actions/setup-python@v5
39
40
with :
40
41
python-version : ${{ matrix.config.python-version }}
42
+
41
43
- name : Install OpenMP runtime for unit tests with xgboost learners
42
44
if : matrix.config.os == 'macOS-latest'
43
45
run : brew install libomp
46
+
44
47
- name : Install dependencies
45
48
run : |
46
49
python -m pip install --upgrade pip
47
50
pip install -e .[dev,rdd]
48
- - name : Lint with ruff
49
- run : |
50
- # stop the build if there are Python syntax errors or undefined names
51
- ruff check . --select E9,F63,F7,F82 --output-format=full --statistics
52
- # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
53
- ruff check . --exit-zero --line-length 127 --output-format=full --statistics
54
- - name : Check code formatting with black
51
+
52
+ - name : Run pre-commit checks
55
53
run : |
56
- black --check --verbose . || echo "Warning: Code is not formatted according to black"
57
- exit 0
54
+ pip install pre-commit
55
+ pre-commit run --all-files --show-diff-on-failure
56
+
58
57
- name : Test with pytest
59
58
if : |
60
59
matrix.config.os != 'ubuntu-latest' ||
You can’t perform that action at this time.
0 commit comments