README: update development section

* Mention that upstream is on SourceHut now
* Move it to the top, so people see this immediatelly
* Modernize instructions for running CI
This commit is contained in:
Oliver Smith 2022-10-25 22:07:56 +02:00
parent 39d75445b5
commit 1df2160129
No known key found for this signature in database
GPG Key ID: 5AE7F5513E0885CB
1 changed files with 22 additions and 34 deletions

View File

@ -3,6 +3,28 @@
Sophisticated chroot/build/flash tool to develop and install
[postmarketOS](https://postmarketos.org).
## Development
pmbootstrap is being developed on SourceHut
([what](https://postmarketos.org/blog/2022/07/25/considering-sourcehut/)):
https://git.sr.ht/~postmarketos/pmbootstrap
Send patches via mail or web UI to
[pmbootstrap-devel](https://lists.sr.ht/~postmarketos/pmbootstrap-devel):
```
~postmarketos/pmbootstrap-devel@lists.sr.ht
```
Run CI scripts locally with:
```
$ pmbootstrap ci
```
Run a single test file:
```
$ pytest -vv ./test/test_keys.py
```
## Requirements
* Linux distribution on the host system (`x86`, `x86_64`, or `aarch64`)
* [Windows subsystem for Linux (WSL)](https://en.wikipedia.org/wiki/Windows_Subsystem_for_Linux)
@ -229,39 +251,5 @@ For example, a `~/.config/pmbootstrap.cfg` may contain:
ssh_key_glob = ~/.ssh/postmarketos-dev.pub
# ...
## Development
### Requirements for running tests
* [Shellcheck](https://shellcheck.net/)
You also need to install the following python packages (pip can be useful if you distribution hasn't got them packaged):
* `pytest`
* `pytest-cov`
* `flake8`
On Alpine Linux it can be done with:
```shell
$ sudo apk add grep shellcheck py3-pytest py3-pytest-cov py3-flake8
```
### Running linters
The easiest way is to run the same script CI runs:
```shell
$ ./test/static_code_analysis.sh
```
### Running tests
You can now run `pytest -vv` inside the pmbootstrap folder to run all available tests.
CI runs slightly reduces set of tests (it skips tests that require running qemu) by this:
```shell
$ .ci/pytest.sh
```
This is the easiest way to do the same as CI.
Alternatively you can run a single test file if you wish:
```shell
$ pytest -vv ./test/test_keys.py
```
## License
[GPLv3](LICENSE)