From 92f3ab2903fd3ce8ef165efc262985bc8e4dd451 Mon Sep 17 00:00:00 2001 From: kozabrada123 Date: Thu, 8 Aug 2024 19:43:08 +0200 Subject: [PATCH 1/2] CI/CD: add cargo-doc job --- .github/workflows/cargo-doc.yml | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/cargo-doc.yml diff --git a/.github/workflows/cargo-doc.yml b/.github/workflows/cargo-doc.yml new file mode 100644 index 0000000..38fd8a8 --- /dev/null +++ b/.github/workflows/cargo-doc.yml @@ -0,0 +1,36 @@ +name: cargo doc lints + +on: + push: + branches: [ "main", "preserve/*" ] + pull_request: + branches: [ "main", "dev" ] + +jobs: + cargo-doc-lints: + name: Run cargo doc for doc lints + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Install aditional components for sarif + run: cargo install clippy-sarif sarif-fmt + + - name: Run cargo doc + run: + cargo doc -no-deps --all-features --locked --message-format=json | clippy-sarif | tee cargo-doc-results.sarif | sarif-fmt + continue-on-error: true + + - name: Upload analysis results to GitHub + uses: github/codeql-action/upload-sarif@v3 + with: + sarif_file: cargo-doc-results.sarif + wait-for-processing: true From 4e4c41eb034301e67edf261a721fd8abf60ab07e Mon Sep 17 00:00:00 2001 From: kozabrada123 Date: Thu, 8 Aug 2024 19:46:14 +0200 Subject: [PATCH 2/2] fix: missed a - --- .github/workflows/cargo-doc.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/cargo-doc.yml b/.github/workflows/cargo-doc.yml index 38fd8a8..6660cac 100644 --- a/.github/workflows/cargo-doc.yml +++ b/.github/workflows/cargo-doc.yml @@ -26,7 +26,7 @@ jobs: - name: Run cargo doc run: - cargo doc -no-deps --all-features --locked --message-format=json | clippy-sarif | tee cargo-doc-results.sarif | sarif-fmt + cargo doc --no-deps --all-features --locked --message-format=json | clippy-sarif | tee cargo-doc-results.sarif | sarif-fmt continue-on-error: true - name: Upload analysis results to GitHub