From cc7a9a97fb7248d2ee689d58ec5a0be265deac64 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 12 Nov 2025 18:15:43 -0500 Subject: [PATCH 1/3] Track code coverage metrics --- .github/workflows/ci.yaml | 27 +++++++++++++++++++++++++++ README.md | 4 +++- 2 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e388f35..b1ba7a7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -16,6 +16,33 @@ env: RUSTFLAGS: --deny warnings jobs: + coverage: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + components: llvm-tools-preview + + - uses: Swatinem/rust-cache@v2 + + - uses: taiki-e/install-action@v2 + with: + tool: cargo-llvm-cov + + - name: Generate coverage report + run: cargo llvm-cov --workspace --all-features --all-targets --lcov --output-path lcov.info + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v5 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: lcov.info + flags: unit + fail_ci_if_error: true + lint: runs-on: ubuntu-latest diff --git a/README.md b/README.md index 958b30b..07f1a3b 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ ## present +[![release](https://img.shields.io/github/release/terror/present.svg?label=release&style=flat&labelColor=282c34&logo=github)](https://github.com/terror/present/releases/latest) [![CI](https://github.com/terror/present/actions/workflows/ci.yaml/badge.svg)](https://github.com/terror/present/actions/workflows/ci.yaml) +[![codecov](https://codecov.io/gh/terror/present/graph/badge.svg?token=7CH4XDXO7Z)](https://codecov.io/gh/terror/present) [![crates.io](https://shields.io/crates/v/present.svg)](https://crates.io/crates/present) -[![docs.rs](https://img.shields.io/docsrs/present)](https://docs.rs/present) +[![downloads](https://img.shields.io/crates/d/present)](https://crates.io/crates/present) [![dependency status](https://deps.rs/repo/github/terror/present/status.svg)](https://deps.rs/repo/github/terror/present) **present** is a tool that lets you interpolate the standard output of arbitrary From 344b3b35f5c58b6558c20215d03d17d84f394b2a Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 12 Nov 2025 18:18:28 -0500 Subject: [PATCH 2/3] Tweak --- README.md | 51 ++++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 07f1a3b..593371b 100644 --- a/README.md +++ b/README.md @@ -84,9 +84,10 @@ fn main() { ``` > The above snippet is tested with rustdoc. A really cool side effect of this, -is that the test loads the README itself, and runs `present` over it. `present` -is also used throughout the README (to get help-text and version numbers), which -means that when running `cargo test`, the README gets automatically updated. +> is that the test loads the README itself, and runs `present` over it. +> `present` is also used throughout the README (to get help-text and version +> numbers), which means that when running `cargo test`, the README gets +> automatically updated. You can read more about using the library on [docs.rs](https://docs.rs/present). @@ -102,22 +103,24 @@ Below are a few examples showcasing what kind of command result interpolations - ````ignore - foo +````ignore +foo + +```present echo bar +``` +```` - ```present echo bar - ``` - ```` - ````ignore - foo +````ignore +foo + +```present echo bar +bar +``` +```` - ```present echo bar - bar - ``` - ```` @@ -125,20 +128,22 @@ Below are a few examples showcasing what kind of command result interpolations - ````ignore - foo +````ignore +foo + +```present echo bar +``` +```` - ```present echo bar - ``` - ```` - ````ignore - foo +```ignore +foo + +bar +``` - bar - ```` From 36e268f9498bca0a1c250dc413416551dc3e85b6 Mon Sep 17 00:00:00 2001 From: Liam Date: Wed, 12 Nov 2025 18:30:53 -0500 Subject: [PATCH 3/3] Add installation section to readme --- README.md | 50 +++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 41 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 593371b..df785c5 100644 --- a/README.md +++ b/README.md @@ -20,21 +20,53 @@ Below is a short demo showcasing the main functionality of the program. [![asciicast](https://asciinema.org/a/499682.svg)](https://asciinema.org/a/499682) -## Usage - -You can use `present` from the command-line interface (CLI) or library. +## Installation -### CLI +`present` should run on any system, including Linux, MacOS, and the BSDs. -You can install the `present` command-line utility with the rust package manager -[cargo](https://github.com/rust-lang/cargo): +The easiest way to install it is by using [cargo](https://doc.rust-lang.org/cargo/index.html), +the Rust package manager: ```bash -$ cargo install present +cargo install present ``` -In addition, pre-built binaries can be found on the -[releases](https://github.com/terror/present/releases) page. +Otherwise, see below for the complete package list: + +#### Cross-platform + + + + + + + + + + + + + + + + + + + + + +
Package ManagerPackageCommand
Cargopresentcargo install present
Homebrewterror/tap/presentbrew install terror/tap/present
+ +### Pre-built binaries + +Pre-built binaries for Linux, MacOS, and Windows can be found on [the releases +page](https://github.com/terror/present/releases). + +## Usage + +You can use `present` from the command-line interface (CLI) or library. + +### CLI Below is the standard output of `present --help`, interpolated by the `present` binary itself!