CI: Integrate pre-commit for style checks

This commit is contained in:
Thaddeus Crews
2024-11-14 13:54:08 -06:00
parent 5338ea5539
commit f70686cdbe
12 changed files with 30 additions and 62 deletions

View File

@@ -15,19 +15,11 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Style checks via pre-commit
uses: pre-commit/action@v3.0.1
- name: Install dependencies
run: |
# Install tools used by `_tools/format.sh`.
sudo apt-get -qq update
sudo apt-get -qq install dos2unix recode
sudo pip3 install -r requirements.txt
sudo pip3 install codespell
- name: Linter checks
run: |
bash _tools/format.sh
codespell -D- -D _tools/codespell-dict.txt -I _tools/codespell-ignore.txt -x _tools/codespell-ignore-lines.txt -S tutorials/i18n/locales.rst {about,community,contributing,getting_started,tutorials}/{*.rst,**/*.rst,**/**/*.rst,**/**/**/*.rst}
run: sudo pip3 install -r requirements.txt
# Use dummy builder to improve performance as we don't need the generated HTML in this workflow.
- name: Sphinx build