doc: add CONTRIBUTING.md

This commit is contained in:
Rob Watson 2025-04-17 11:26:15 +02:00
parent b147da6d9b
commit c022c18a7f
2 changed files with 49 additions and 0 deletions

43
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,43 @@
# Contributing
Thanks for contributing to Octoplex!
## Development
### Mise
Octoplex uses [mise](https://mise.jdx.dev/installing-mise.html) as a task
runner and environment management tool.
Once installed, you can run common development tasks easily:
Command|Shortcut|Description
---|---|---
`mise run test`|`mise run t`|Run unit tests
`mise run test_integration`|`mise run ti`|Run integration tests
`mise run lint`|`mise run l`|Run linter
`mise run format`|`mise run f`|Run formatter
`mise run generate_mocks`|`mise run m`|Re-generate mocks
### Tests
#### Integration tests
The integration tests (mostly in `/internal/app/integration_test.go`) attempt
to exercise the entire app, including launching containers and rendering the
terminal output.
Sometimes they can be flaky. Always ensure there are no stale Docker containers
present from previous runs, and that nothing is listening or attempting to
broadcast to localhost:1935 or localhost:1936.
## Opening a pull request
Pull requests are welcome, but please propose significant changes in a
[discussion](https://github.com/rfwatson/octoplex/discussions) first.
1. Fork the repo
2. Make your changes, including test coverage
3. Push the changes to a branch
4. Ensure the branch is passing
5. Open a pull request

View File

@ -29,6 +29,12 @@ dir = "{{cwd}}"
run = "golangci-lint run" run = "golangci-lint run"
alias = "l" alias = "l"
[tasks.fmt]
description = "Run formatter"
dir = "{{cwd}}"
run = "goimports -w ."
alias = "f"
[tasks.generate_mocks] [tasks.generate_mocks]
description = "Generate mocks" description = "Generate mocks"
dir = "{{cwd}}" dir = "{{cwd}}"