Skip to content

Commit

Permalink
Test cargo doc in CI (#480)
Browse files Browse the repository at this point in the history
  • Loading branch information
max-sixty authored May 15, 2024
1 parent 2cc5d18 commit 987928d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@ name: Tests

on: [push, pull_request]

env:
CARGO_TERM_COLOR: always
CLICOLOR_FORCE: 1
RUSTDOCFLAGS: "-Dwarnings"

jobs:
test-latest:
name: Test on Latest
Expand Down Expand Up @@ -47,3 +52,15 @@ jobs:
perl -ni -e 'print unless /\[profile\.dist\]/ .. eof' Cargo.toml
- name: Check
run: cargo check -p insta --no-default-features

build-docs:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
- uses: Swatinem/rust-cache@v2
- name: doc
run: cargo doc --all-features
8 changes: 4 additions & 4 deletions insta/src/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ macro_rules! _function_name {
///
/// **Feature:** `csv` (disabled by default)
///
/// This works exactly like [`assert_yaml_snapshot!`]
/// This works exactly like [`crate::assert_yaml_snapshot!`]
/// but serializes in [CSV](https://github.com/burntsushi/rust-csv) format instead of
/// YAML.
///
Expand Down Expand Up @@ -48,7 +48,7 @@ macro_rules! assert_csv_snapshot {
///
/// **Feature:** `toml` (disabled by default)
///
/// This works exactly like [`assert_yaml_snapshot!`]
/// This works exactly like [`crate::assert_yaml_snapshot!`]
/// but serializes in [TOML](https://github.com/alexcrichton/toml-rs) format instead of
/// YAML. Note that TOML cannot represent all values due to limitations in the
/// format.
Expand Down Expand Up @@ -92,7 +92,7 @@ macro_rules! assert_toml_snapshot {
/// assert_yaml_snapshot!(vec![1, 2, 3]);
/// ```
///
/// Unlike the [`assert_debug_snapshot!`]
/// Unlike the [`crate::assert_debug_snapshot!`]
/// macro, this one has a secondary mode where redactions can be defined.
///
/// The third argument to the macro can be an object expression for redaction.
Expand Down Expand Up @@ -388,7 +388,7 @@ macro_rules! assert_display_snapshot {
///
/// Optionally a third argument can be given as an expression to be stringified
/// as the debug expression. For more information on this, check out
/// https://insta.rs/docs/snapshot-types/.
/// <https://insta.rs/docs/snapshot-types/>.
#[macro_export]
macro_rules! assert_snapshot {
($($arg:tt)*) => {
Expand Down

0 comments on commit 987928d

Please sign in to comment.