diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 25d8e26..7dbaf2e 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -25,7 +25,7 @@ jobs: run: sudo apt update # This is needed for the container resolver dependencies - - name: Install libgpgme devel package + - name: Install test dependencies run: sudo apt install -y libgpgme-dev libbtrfs-dev libdevmapper-dev podman - name: Build diff --git a/HACKING.md b/HACKING.md new file mode 100644 index 0000000..54380e7 --- /dev/null +++ b/HACKING.md @@ -0,0 +1,42 @@ +# Hacking on image-builder-cli + +Hacking on `image-builder` should be fun and is easy. + +We have unit tests and some integration testing. + +## Setup + +To work on bootc-image-builder one needs a working Go environment. See +[go.mod](go.mod). + +To run the testsuite install the test dependencies as outlined in the +[github action](./.github/workflows/go.yml) under +"Install test dependencies". + +## Code layout + +The go source code of image-builder-cli is under +`./cmd/image-builder`. It uses the +[images](https://github.com/osbuild/images) library internally to +generate the images. Unit tests (and integration tests where it makes +sense) are expected to be part of every PR but we are happy to help if +those are missing from a PR. + +## Build + +Build by running: +```console +$ go build ./cmd/image-builder/ +``` + +## Unit tests + +Run the unit tests via: +```console +$ go test -short ./... +``` + +There are some integration tests that can be run via: +```console +$ go test ./... +```