Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: rename bin to codspeed #30

Closed
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
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ edition = "2021"
repository = "https://github.com/CodSpeedHQ/runner"
publish = false

[[bin]]
name = "codspeed"
path = "src/main.rs"


[dependencies]
anyhow = "1.0.75"
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
<div align="center">
<h1><code>codspeed-runner</code></h1>
<h1><code>codspeed</code></h1>

CLI to gather performance data from CI environments and upload performance reports to [CodSpeed](https://codspeed.io)
CLI to gather performance data and upload performance reports to [CodSpeed](https://codspeed.io)

[![CI](https://github.com/CodSpeedHQ/runner/actions/workflows/ci.yml/badge.svg)](https://github.com/CodSpeedHQ/runner/actions/workflows/ci.yml)
[![Discord](https://img.shields.io/badge/chat%20on-discord-7289da.svg)](https://discord.com/invite/MxpaCfKSqF)
[![CodSpeed Badge](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://codspeed.io/)

</div>

The `codspeed-runner` CLI is designed to be used in CI environments.
The `codspeed` CLI is designed to be used both in local in CI environments.

The following providers are supported:
The following CI providers are supported:

- [GitHub Actions](https://docs.codspeed.io/ci/github-actions): Usage with [`@CodSpeedHQ/action`](https://github.com/CodSpeedHQ/action) is recommended.
- [Buildkite](https://docs.codspeed.io/ci/buildkite)
Expand Down Expand Up @@ -40,11 +40,11 @@ Refer to the [releases page](https://github.com/CodSpeedHQ/runner/releases) to s
Example of a command to run benchmarks with [Vitest](https://docs.codspeed.io/benchmarks/nodejs/vitest):

```bash
codspeed-runner run --token=$CODSPEED_TOKEN -- pnpm vitest bench
codspeed run --token=$CODSPEED_TOKEN -- pnpm vitest bench
```

```
Usage: codspeed-runner run [OPTIONS] [COMMAND]...
Usage: codspeed run [OPTIONS] [COMMAND]...

Arguments:
[COMMAND]... The bench command to run
Expand All @@ -65,5 +65,5 @@ Options:
Use the `CODSPEED_LOG` environment variable to set the logging level:

```bash
CODSPEED_LOG=debug codspeed-runner run ...
CODSPEED_LOG=debug codspeed run ...
```
4 changes: 2 additions & 2 deletions src/run/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn show_banner() {
VERSION
);
println!("{}", banner);
debug!("codspeed-runner v{}", VERSION);
debug!("codspeed v{}", VERSION);
}

#[derive(Args, Debug)]
Expand Down Expand Up @@ -113,7 +113,7 @@ pub async fn run(args: RunArgs, api_client: &CodSpeedAPIClient) -> Result<()> {

if provider.get_provider_slug() == "local" {
if codspeed_config.auth.token.is_none() {
bail!("You have to authenticate the CLI first. Run `codspeed-runner auth login`.");
bail!("You have to authenticate the CLI first. Run `codspeed auth login`.");
}
debug!("Using the token from the CodSpeed configuration file");
config.set_token(codspeed_config.auth.token.clone());
Expand Down
Loading