Contributing
View SourceThanks for your interest in improving the PostHog Elixir SDK.
Developing locally
Fetch dependencies and run the test suite from the repository root:
mix deps.get
mix test
Integration tests
To run the integration test suite that sends real events to the API:
Create a test PostHog project and obtain an API key.
Create
config/integration.exsfrom the example file:cp config/integration.example.exs config/integration.exsPut your API key into
config/integration.exs.Run the integration tests:
mix test --only integration
Local development config
If you want to play with PostHog events in IEx, create config/dev.override.exs and point it at the instance of your choosing. This file is gitignored. A minimal example:
# config/dev.override.exs
import Config
config :posthog,
enable: true,
api_host: "https://us.i.posthog.com",
api_key: "phc_XXXX"Pull requests
- Fork the repository and create your feature branch.
- Make your changes and ensure tests pass with
mix test. - Run
mix formatandmix credo --strictto ensure code quality. - Open a pull request.