Skip to content

Advisory Checks

Advisory Checks #2

Workflow file for this run

name: Advisory Checks
on:
schedule:
- cron: "0 8 * * 1"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
RUST_LIB_BACKTRACE: 1
RUST_LOG: info
COLORBT_SHOW_HIDDEN: 1
jobs:
link-check:
name: Documentation links
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- name: Restore Lychee cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae #v5.0.5
with:
path: .lycheecache
key: cache-lychee-${{ github.sha }}
restore-keys: cache-lychee-
- name: Check links
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 #v2.8.0
with:
args: >-
--verbose
--no-progress
--cache
--config .lychee.toml
"**/*.md"
fail: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
beta-clippy:
name: Beta Clippy / ${{ matrix.type }}
runs-on: ubuntu-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
type: [release, tests]
include:
- type: release
args: --workspace --all-targets
features: default-release-binaries
- type: tests
args: --workspace --all-targets
features: default-release-binaries proptest-impl lightwalletd-grpc-tests zebra-checkpoints
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
components: clippy
toolchain: beta
cache-on-failure: true
- uses: ./.github/actions/setup-zebra-build
- name: Run Clippy
run: cargo clippy ${{ matrix.args }} --features "${{ matrix.features }}"
beta-unit-tests:
name: Beta unit tests
runs-on: ubuntu-latest
timeout-minutes: 120
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
toolchain: beta
cache-key: advisory-unit-tests-beta
cache-on-failure: true
- uses: taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 #v2.79.3
with:
tool: cargo-nextest
- uses: ./.github/actions/setup-zebra-build
- name: Run unit tests
run: cargo nextest run --profile ci --locked --release --features default-release-binaries --run-ignored=all
nightly-docs:
name: Nightly documentation
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
toolchain: nightly
cache-on-failure: true
- uses: ./.github/actions/setup-zebra-build
- name: Build documentation
run: cargo doc --no-deps --workspace --all-features --document-private-items --target-dir "$(pwd)"/target/internal
env:
# Keep the warning policy aligned with the published documentation build.
RUSTDOCFLAGS: --html-in-header katex-header.html -A rustdoc::private_intra_doc_links -D warnings
nightly-features:
name: Nightly exhaustive features
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
toolchain: nightly
cache-on-failure: true
- uses: taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 #v2.79.3
with:
tool: cargo-hack
- uses: ./.github/actions/setup-zebra-build
- name: Check feature combinations
run: cargo hack check --all
env:
RUSTFLAGS: -D warnings
unused-deps:
name: Nightly unused dependencies
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd #v6.0.2
with:
persist-credentials: false
- uses: actions-rust-lang/setup-rust-toolchain@46268bd060767258de96ed93c1251119784f2ab6 #v1.16.1
with:
toolchain: nightly
cache-on-failure: true
- uses: taiki-e/install-action@65851e10cd6c377f11a60e600abc07cb08643468 #v2.79.3
with:
tool: cargo-udeps
- uses: ./.github/actions/setup-zebra-build
- name: Check unused dependencies
run: cargo udeps --workspace --all-targets --all-features --locked
failure-issue:
name: Open or update an issue for advisory failures
needs:
- link-check
- beta-clippy
- beta-unit-tests
- nightly-docs
- nightly-features
- unused-deps
if: failure()
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- uses: jayqi/failed-build-issue-action@1a893bbf43ef1c2a8705e2b115cd4f0fe3c5649b #v1.2.0
with:
title-template: "{{refname}} advisory checks failed: {{eventName}} in {{workflow}}"
label-name: S-ci-fail-auto-issue
always-create-new-issue: false
github-token: ${{ secrets.GITHUB_TOKEN }}