Skip to content

Compare: Runbook

Showing with 28 additions and 2 deletions.
  1. +28 −2 Runbook.md
30 changes: 28 additions & 2 deletions Runbook.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<!--ts-->
* [Releasing](#releasing)
* [Testing](#testing)
* [Unit Testing](#testing)
* [Running tests locally](#running-tests-locally)
* [Updating tests](#updating-tests)
* [Running tests in CI](#running-tests-in-ci)
* [Debugging tests in CI](#debugging-tests-in-ci)
* [Manual Testing](#manual-testing)
* [Manually testing from the git repo](#manually-testing-from-the-git-repo)
* [Profiling](#profiling)
* [With tracing](#with-tracing)
* [With cargo-flamegraph](#with-cargo-flamegraph)
Expand All @@ -26,7 +28,7 @@ To release a new version:
* Run `cargo publish` to publish the code to `crates.io`.
* [Create a Github release](https://github.com/arxanas/git-branchless/releases/new) for the version tag. Leave the release title empty to automatically use the tag name as the release title. Copy and paste the changelog contents for this version into the release notes.

## Testing
## Unit Testing

### Running tests locally

Expand Down Expand Up @@ -75,6 +77,30 @@ If you're encountering strange test failures that only appear in CI, try adding
uses: mxschmitt/action-tmate@v3
```

## Manual Testing

### Manually testing from the git repo

In order to test a build right from the git repo, e.g. `master` or a pull request, you can either build and install the binary "globally", or you can just build the binary and then run it without installing it. (At least, that's what I've been doing as I've been hacking around.)

```
# clone; checkout what you want to test;
# e.g. git clone https://github.com/arxanas/git-branchless.git && cd git-branchless & gh pr checkout 326
# then ...
# either install "globally" via ...
$ cargo install --path .
$ cd my-repo
$ git restack ...
# or just build it and run it locally via ...
$ cargo build
$ cd my-repo
$ /path/to/git-branchless-repo/target/debug/git-branchless restack ...
```

I have been doing the former when I have a test feature I want to play with in real work, and the latter when I just want to test something one-off.

## Profiling

### With `tracing`
Expand Down