]> Repositories - hackapet/Adafruit_Blinka_Displayio.git/blobdiff - .github/workflows/build.yml
Add pre-commit support.
[hackapet/Adafruit_Blinka_Displayio.git] / .github / workflows / build.yml
index 2582867ba777701eabcf19c888d4c5a68f3c50a7..ac6673b0a9fa0a40f024e39ad8a2f24574cb09c8 100644 (file)
@@ -1,3 +1,8 @@
+# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries
+# SPDX-FileCopyrightText: 2020 Melissa LeBlanc-Williams, written for Adafruit Industries
+#
+# SPDX-License-Identifier: MIT
+
 name: Build CI
 
 on: [pull_request, push]
@@ -36,16 +41,12 @@ jobs:
         source actions-ci/install.sh
     - name: Pip install pylint, black, & Sphinx
       run: |
-        pip install --force-reinstall pylint black Sphinx sphinx-rtd-theme
+        pip install --force-reinstall pylint black Sphinx sphinx-rtd-theme pre-commit
     - name: Library version
       run: git describe --dirty --always --tags
-    - name: Check formatting
-      run: |
-        black --check --target-version=py35 .
-    - name: PyLint
+    - name: Pre-commit hooks
       run: |
-        pylint $( find . -path './*io/*.py' )
-        pylint $( find . -path './*io.py' )
+        pre-commit run --all-files
     - name: Build docs
       working-directory: docs
       run: sphinx-build -E -W -b html . _build/html