doc: add CONTRIBUTING.md
This commit is contained in:
parent
b147da6d9b
commit
c022c18a7f
43
CONTRIBUTING.md
Normal file
43
CONTRIBUTING.md
Normal 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
|
@ -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}}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user