Skip to content

Commit

Permalink
Add cargo-deadlinks to CI
Browse files Browse the repository at this point in the history
- Use --cfg docsrs
- Only check dependencies
- Pass --all-features
  • Loading branch information
jyn514 committed Nov 14, 2020
1 parent 7ede450 commit eb88759
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -274,3 +274,26 @@ jobs:
args: --root ${{ runner.tool_cache }}/cargo-audit --force cargo-audit
- run: echo "${{ runner.tool_cache }}/cargo-audit/bin" >> $GITHUB_PATH
- run: cargo audit

cargo-deadlinks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
profile: minimal
- name: Build the documentation
uses: actions-rs/cargo@v1
with:
command: doc
args: --all-features
env:
RUSTDOCFLAGS: --cfg docsrs
- name: Install cargo-deadlinks
run: wget https://github.com/deadlinks/cargo-deadlinks/releases/download/0.4.2/deadlinks-linux
- run: chmod +x deadlinks-linux
# Only check links for this crate, since we can't control our dependencies
# FIXME(deadlinks#89): this is hacky
- run: ls -d tracing* | tr - _ | xargs -i -n1 ./deadlinks-linux deadlinks --dir target/doc/{}

0 comments on commit eb88759

Please sign in to comment.