Merge pull request #5434 from microDev1/ci-patch

Upload patch to artifacts if pre-commit fails
This commit is contained in:
Scott Shawcroft 2021-10-06 17:53:46 -07:00 committed by GitHub
commit 46b1efe909
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -17,8 +17,8 @@ jobs:
- name: Install deps
run: |
sudo apt-add-repository -y -u ppa:pybricks/ppa
sudo apt-get install -y black gettext uncrustify
pip3 install -r requirements-dev.txt
sudo apt-get install -y gettext uncrustify
pip3 install black polib pyyaml
- name: Populate selected submodules
run: git submodule update --init extmod/ulab
- name: Set PY
@ -28,3 +28,12 @@ jobs:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- uses: pre-commit/action@v1.1.0
- name: Make patch
if: failure()
run: git diff > ~/pre-commit.patch
- name: Upload patch
if: failure()
uses: actions/upload-artifact@v2
with:
name: patch
path: ~/pre-commit.patch