Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,11 @@ jobs:
run: |
uv run tox

commitlint:
name: Conventional Commit Lint
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- uses: webiny/[email protected]
65 changes: 65 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Contributing guidelines

1. All changes must be covered with tests (ideally unit + integration)
2. All commits must follow the [conventional commit][1] format
3. All changes must pass the workflow tests
4. If a bug is fixed, a test should be added to ensure regression doesn't appear

## Local testing

This project uses [`uv`][2]. To set up the project locally, use

```bash
uv pip install .
```

To test, you also need development tools, add them to your local environment
using this command:

```bash
uv pip install --group dev
```

Then you can use [`tox`][3] to run linting and unit tests.

For integration tests you also need [`podman`][4] or [`docker`][5] with
`compose`. Run:

```bash
podman compose up -d
```

Wait a while and then run:

```bash
tox -e integration
```

Don't forget to clean up the test environment afterward. Use

```bash
podman compose down
```

to do that (or switch `podman` with `docker` depending on your tool of choice).

## Releasing

After each contribution to the main branch, an automatic workflow runs to check
if any changes with conventional commit messages were added. If yes, this
workflow creates a pull request with proposed changelog.

To create a new tag, simply merge the automated pull request. This tag is
automatically released to GitHub releases.

To release a new version to PyPI, go to Actions and select "release". Run this
action on your newly created tag.

> NOTE: Do not run PyPI releases on main branch. Always use Git tags!


[1]: https://www.conventionalcommits.org/en/v1.0.0-beta.2/
[2]: https://docs.astral.sh/uv/
[3]: https://tox.wiki/en/4.32.0/
[4]: https://podman.io/
[5]: https://www.docker.com/
44 changes: 3 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,45 +47,7 @@ This whole mechanism **does not ensure message ordering**. When a message is
sent to be retried, another message processing from the same topic is still
unblocked.

## Local testing
## Contributing guidelines

This project uses [`uv`][1]. To set up the project locally, use

```bash
uv pip install .
```

To test, you also need development tools, add them to your local environment
using this command:

```bash
uv pip install --group dev
```

Then you can use [`tox`][2] to run linting and unit tests.

For integration tests you also need [`podman`][3] or [`docker`][4] with
`compose`. Run:

```bash
podman compose up -d
```

Wait a while and then run:

```bash
tox -e integration
```

Don't forget to clean up the test environment afterward. Use

```bash
podman compose down
```

to do that (or switch `podman` with `docker` depending on your tool of choice).

[1]: https://docs.astral.sh/uv/
[2]: https://tox.wiki/en/4.32.0/
[3]: https://podman.io/
[4]: https://www.docker.com/
To check contributing guidelines, please check `CONTRIBUTING.md` in the
GitHub repository.
2 changes: 0 additions & 2 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ services:
volumes:
- ./kafka_config/kafka-startup.sh:/tmp/kafka-startup.sh:ro,z
- ./kafka_config/kafka_server_jaas.conf:/etc/kafka/kafka_server_jaas.conf:ro,z
tmpfs:
- /tmp/kraft-combined-logs:uid=1000,gid=1000
command: ["/bin/bash", "/tmp/kafka-startup.sh"]
healthcheck:
test: ["CMD", "/opt/kafka/bin/kafka-broker-api-versions.sh", "--bootstrap-server", "localhost:9093"]
Expand Down