Skip to content

Merge pull request #29 from IamMaxim/docs/release-note-0-9-0 #79

Merge pull request #29 from IamMaxim/docs/release-note-0-9-0

Merge pull request #29 from IamMaxim/docs/release-note-0-9-0 #79

Workflow file for this run

name: ci
on:
push:
branches: [master]
pull_request:
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUSTFLAGS: -D warnings
jobs:
test:
name: fmt + clippy + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Format
run: cargo fmt --all --check
- name: Clippy
run: cargo clippy --workspace --all-targets
- name: Test
run: cargo test --workspace --locked
# `--workspace` does NOT cover the `s3` feature, and the tests behind it are
# `#![cfg(feature = "s3")]`, so they compile to nothing without this step.
#
# DOCGEN_S3_E2E=1 turns "docker is unavailable" from a skip into a failure.
# Without it the S3 end-to-end test would quietly no-op on a runner with no
# docker and report green — which is the same class of false confidence that
# let a release ship with every upload broken. The test starts its own MinIO
# over TLS; ubuntu-latest ships docker and openssl, so nothing else is needed.
- name: Test (s3 feature, incl. MinIO end-to-end)
env:
DOCGEN_S3_E2E: "1"
run: cargo test -p docgen-rs --features s3 --locked
docs:
name: docs site builds
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build docs site
run: cargo run -p docgen-rs -- build website
- name: Fail on broken wikilinks
# docgen renders an unresolved [[link]] as a marked span rather than
# failing the build; catch those so a typo'd link can't ship. Match the
# exact broken-span attribute, not the bare class name (which also
# appears in the stylesheet, the search index, and prose that documents
# the marker).
run: |
if grep -rl 'class="docgen-wikilink docgen-wikilink--broken"' website/dist; then
echo "::error::Broken wikilink(s) found in the built docs site (files listed above)."
exit 1
fi
echo "No broken wikilinks."