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:
3434 - uses : actions/checkout@v4
3535 with :
3636 fetch-depth : 2
37+
3738 - name : Set up Python ${{ matrix.config.python-version }}
3839 uses : actions/setup-python@v5
3940 with :
4041 python-version : ${{ matrix.config.python-version }}
42+
4143 - name : Install OpenMP runtime for unit tests with xgboost learners
4244 if : matrix.config.os == 'macOS-latest'
4345 run : brew install libomp
46+
4447 - name : Install dependencies
4548 run : |
4649 python -m pip install --upgrade pip
4750 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
5553 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+
5857 - name : Test with pytest
5958 if : |
6059 matrix.config.os != 'ubuntu-latest' ||
You can’t perform that action at this time.
0 commit comments