- uses: actions/checkout@v2
- name: Install
- run: python3 -m pip install pytest mypy
+ run: python3 -m pip install pytest mypy black
+
+ - name: Check formatting
+ run: python3 -m black --check mkosi/ tests/
- name: Type Checking
run: python3 -m mypy mkosi
- name: Test editable user installation
run: |
- python3 -m pip install --user --editable .
+ python3 -m pip install --user --no-use-pep517 --editable .
$HOME/.local/bin/mkosi -h
python3 -m pip uninstall --yes mkosi
- name: Test editable user installation (sudo call)
run: |
- python3 -m pip install --user --editable .
+ python3 -m pip install --user --no-use-pep517 --editable .
sudo $HOME/.local/bin/mkosi -h
python3 -m pip uninstall --yes mkosi
# clone either this repository or your fork of it
git clone https://github.com/systemd/mkosi/
cd mkosi
-python3 -m pip install --user --editable .
+python3 -m pip install --user --no-use-pep517 --editable .
```
This will install mkosi in editable mode to `~/.local/bin/mkosi`, allowing you
to use your own changes right away.
-For development you optionally also need [mypy](https://github.com/python/mypy)
-and [pytest](https://github.com/pytest-dev/pytest). We check tests and typing in
-CI (see `.github/workflows`), but you can run the tests locally as well.
+For development you also need [mypy](https://github.com/python/mypy), for type
+checking, [pytest](https://github.com/pytest-dev/pytest), to run tests, and
+[black](https://github.com/psf/black), for code formatting. We check tests,
+typing and code formatting in CI (see `.github/workflows`), but you can run the
+tests locally as well.
## zipapp