Verified Commit 4bb09e8f authored by Alexander Jaust's avatar Alexander Jaust
Browse files

[ci][style] Check style of Python files

parent 86518754
Pipeline #13033 passed with stages
in 13 minutes and 51 seconds
......@@ -21,6 +21,21 @@ check-style-clang-10:
- style-patch.diff
expire_in: 2 days
check-style-black:
stage: check
script:
- sudo apt-get update && sudo apt-get install -y python3 python3-distutils python-is-python3 wget
- wget https://bootstrap.pypa.io/get-pip.py && python get-pip.py && rm get-pip.py && ln -sf ${HOME}/.local/bin/pip3 ${HOME}/.local/bin/pip && export PATH="${HOME}/.local/bin":"${PATH}" && pip install black
- black .
- git diff > python-style-patch.diff
- if [ -s python-style-patch.diff ]; then echo "Download the style patch as artifact and apply it or run black . and commit again."; false; fi
needs: []
artifacts:
when: on_failure
paths:
- python-style-patch.diff
expire_in: 2 days
.build_template: &build-tests
stage: build
script:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment