-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3ca479c
commit bddd727
Showing
1 changed file
with
22 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,48 @@ | ||
Thanks for your interest in contributing to `ouch`! | ||
|
||
# Code of Conduct | ||
# Table of contents: | ||
|
||
- [Code of Conduct](#code-of-conduct) | ||
- [I want to ask a question or provide feedback](#i-want-to-ask-a-question-or-provide-feedback) | ||
- [Adding a new feature](#adding-a-new-feature) | ||
- [PRs](#prs) | ||
- [Dealing with UI tests](#dealing-with-ui-tests) | ||
|
||
## Code of Conduct | ||
|
||
We follow the [Rust Official Code of Conduct](https://www.rust-lang.org/policies/code-of-conduct). | ||
|
||
# I want to ask a question or provide feedback | ||
## I want to ask a question or provide feedback | ||
|
||
Create [an issue](https://github.com/ouch-org/ouch/issues) or go to [Ouch Discussions](https://github.com/ouch-org/ouch/discussions). | ||
|
||
# Adding a brand new feature | ||
## Adding a new feature | ||
|
||
Before opening the PR, open an issue to discuss your addition, this increases the chance of your PR being accepted. | ||
|
||
# PRs | ||
## PRs | ||
|
||
- Pass all CI checks. | ||
- After opening the PR, add a [CHANGELOG.md] entry. | ||
|
||
# Updating UI tests | ||
[CHANGELOG.md]: https://github.com/ouch-org/ouch | ||
|
||
## Dealing with UI tests | ||
|
||
In case you need to update the UI tests. | ||
We use snapshots to do UI testing and guarantee a consistent output, this way, you can catch accidental changes or see what output changed in the PR diff. | ||
|
||
- Run tests with `insta` to create the new snapshots: | ||
- Run tests with `cargo` normally, or with a filter: | ||
|
||
```sh | ||
cargo insta review # or | ||
cargo insta review -- ui # useful filter | ||
cargo test | ||
# Only run UI tests | ||
cargo test -- ui | ||
``` | ||
|
||
- Now, review the diffs you just generated. | ||
- If some UI test failed, you should review it: | ||
|
||
```sh | ||
cargo insta review | ||
``` | ||
|
||
- You can commit them now. | ||
|
||
[CHANGELOG.md]: https://github.com/ouch-org/ouch | ||
- After addressing all, you should be able to `git add` and `commit` accordingly. |