Skip to content

Commit 46b1efe

Browse files
authored
Merge pull request #5434 from microDev1/ci-patch
Upload patch to artifacts if pre-commit fails
2 parents d2add4b + f2a22bb commit 46b1efe

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/pre-commit.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@ jobs:
1717
- name: Install deps
1818
run: |
1919
sudo apt-add-repository -y -u ppa:pybricks/ppa
20-
sudo apt-get install -y black gettext uncrustify
21-
pip3 install -r requirements-dev.txt
20+
sudo apt-get install -y gettext uncrustify
21+
pip3 install black polib pyyaml
2222
- name: Populate selected submodules
2323
run: git submodule update --init extmod/ulab
2424
- name: Set PY
@@ -28,3 +28,12 @@ jobs:
2828
path: ~/.cache/pre-commit
2929
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
3030
- uses: pre-commit/[email protected]
31+
- name: Make patch
32+
if: failure()
33+
run: git diff > ~/pre-commit.patch
34+
- name: Upload patch
35+
if: failure()
36+
uses: actions/upload-artifact@v2
37+
with:
38+
name: patch
39+
path: ~/pre-commit.patch

0 commit comments

Comments
 (0)