Skip to content
Merged
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
27 changes: 27 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
55 changes: 31 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -82,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).

Expand All @@ -100,43 +103,47 @@ Below are a few examples showcasing what kind of command result interpolations
</td>
<td>

````ignore
foo
````ignore
foo

```present echo bar
```
````

```present echo bar
```
````
</td>
<td>

````ignore
foo
````ignore
foo

```present echo bar
bar
```
````

```present echo bar
bar
```
````
</td>
</tr>
<td>
<code>present foo.md --in-place --remove</code>
</td>
<td>

````ignore
foo
````ignore
foo

```present echo bar
```
````

```present echo bar
```
````
</td>
<td>

````ignore
foo
```ignore
foo

bar
```

bar
````
</td>
</tr>
</table>
Expand Down
Loading