Skip to content

ci: Migrate Gitlab tests to GitHub runner #6

ci: Migrate Gitlab tests to GitHub runner

ci: Migrate Gitlab tests to GitHub runner #6

Workflow file for this run

name: Check rustdoc
on:
pull_request:
jobs:
check-rustdoc:
runs-on: ubuntu-latest
outputs:
head-commit-msg: ${{ steps.step-head-commit.outputs.headCommitMsg }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Get Head Commit Message
id: step-head-commit
run: echo "headCommitMsg=$(git show -s --format=%s)" >> "$GITHUB_OUTPUT"
- name: Free Disk Space
if: ${{ !contains(steps.step-head-commit.outputs.headCommitMsg, 'ci-skip-rust') }}
uses: jlumbroso/free-disk-space@main
with:
tool-cache: true
- name: Set up Cargo Cache
if: ${{ !contains(steps.step-head-commit.outputs.headCommitMsg, 'ci-skip-rust') }}
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: $ ${{ github.job }}-${{ github.ref_name }}-rustdoc-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
$ ${{ github.job }}-${{ github.ref_name }}-rustdoc-
- name: Run cargo doc
if: ${{ !contains(steps.step-head-commit.outputs.headCommitMsg, 'ci-skip-rust') }}
run: |
docker run --rm \
-v "${GITHUB_WORKSPACE}:/workspace" \
-v "${HOME}/.cargo:/root/.cargo" \
-w /workspace \
-e RUSTDOCFLAGS='-D warnings' \
-e SKIP_WASM_BUILD=1 \
paritytech/ci-unified:bullseye-1.74.0 \
bash -c "cargo doc --all-features --no-deps --locked"