From 6df7dacf4128be1cd50af1c27f37703a33d694c7 Mon Sep 17 00:00:00 2001 From: Shinyzenith Date: Sat, 25 Jun 2022 10:24:08 +0530 Subject: [PATCH] [workflow] Check scdoc pages Signed-off-by: Shinyzenith --- .github/workflows/ci.yml | 72 +++++++++++++++++++++++----------------- 1 file changed, 42 insertions(+), 30 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 11dfa57..6f1847c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,46 +3,58 @@ name: CI on: [push, pull_request] env: - CARGO_TERM_COLOR: always + CARGO_TERM_COLOR: always jobs: - build: - runs-on: ubuntu-latest + build: + runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 + steps: + - name: Checkout + uses: actions/checkout@v2 - - name: Build - run: cargo build --release + - name: Build + run: cargo build --release - clippy: - runs-on: ubuntu-latest + clippy: + runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 + steps: + - name: Checkout + uses: actions/checkout@v2 - - name: Clippy - run: cargo clippy + - name: Clippy + run: cargo clippy - test: - runs-on: ubuntu-latest + test: + runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 + steps: + - name: Checkout + uses: actions/checkout@v2 - - name: Run tests - run: cargo test --verbose + - name: Run tests + run: cargo test --verbose - rustfmt: - runs-on: ubuntu-latest + documentation: + runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v2 + steps: + - name: Checkout + uses: actions/checkout@v2 - - name: Check formatting - run: | - cargo fmt -- --check + - name: Check documentation + run: | + sudo apt update + sudo apt install --no-install-recommends scdoc + for file in $(find . -type f -iname "*.scd"); do scdoc < $file > /dev/null; done + rustfmt: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Check formatting + run: | + cargo fmt -- --check