We use nix to ensure a common and consistent development environment. You are also free to manage the environment on your own but that may mean your environment isn't exactly the same as the one used in the CI. If you have nix installed everything you need to do to set the environment is to run `nix develop``
For performance reasons, hasura-storage relies on a C library called libvips. This means that if you are developing locally you will need libvips-dev
and the needed tooling to compile it (i.e. gcc
, pkg-config
). If you are a nix user you can use the provided nix flake to set the development environment for you. If you aren't a nix user, you can rely on the Makefile
to build and run hasura-storage in a docker container with the proper environment set up.
To test your changes locally you can do the following:
- Start the pre-requisite containers with
make dev-env-up-short
- Make your changes to the code
- Build and deploy your container with
make dev-env-up-hasura
. Alternatively, if you have the development environment properly set up you can rungo run main.go serve
ornix run . -- serve
- Run the tests with
make integration-tests
When you are done you can stop your environment with make dev-env-down