diff options
| -rw-r--r-- | Makefile | 15 |
1 files changed, 15 insertions, 0 deletions
| @@ -465,3 +465,18 @@ distclean_userspace: clean | |||
| 465 | rm -f $(QMK_USERSPACE)/*.bin $(QMK_USERSPACE)/*.hex $(QMK_USERSPACE)/*.uf2 | 465 | rm -f $(QMK_USERSPACE)/*.bin $(QMK_USERSPACE)/*.hex $(QMK_USERSPACE)/*.uf2 |
| 466 | echo 'done.' | 466 | echo 'done.' |
| 467 | endif | 467 | endif |
| 468 | |||
| 469 | # Extra targets for formatting and/or pytest, running within the qmk/qmk_cli container to match GHA. | ||
| 470 | CONTAINER_PREAMBLE := export HOME="/tmp"; export PATH="/tmp/.local/bin:\$$PATH"; python3 -m pip install --upgrade pip; python3 -m pip install -r requirements-dev.txt | ||
| 471 | |||
| 472 | .PHONY: format-core | ||
| 473 | format-core: | ||
| 474 | RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk format-c --core-only -a && qmk format-python -a" | ||
| 475 | |||
| 476 | .PHONY: pytest | ||
| 477 | pytest: | ||
| 478 | RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk pytest" | ||
| 479 | |||
| 480 | .PHONY: format-and-pytest | ||
| 481 | format-and-pytest: | ||
| 482 | RUNTIME=docker ./util/docker_cmd.sh bash -lic "$(CONTAINER_PREAMBLE); qmk format-c --core-only -a && qmk format-python -a && qmk pytest" | ||
