Skip to content

Commit

Permalink
Test setup-mdbook.
Browse files Browse the repository at this point in the history
  • Loading branch information
joaander committed Jun 5, 2024
1 parent b7d8573 commit 4ad4de6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
17 changes: 16 additions & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,25 @@ jobs:
- run: uv --version
- run: python -m build --version

setup_mdbook:
name: setup-mdbook [default]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
- name: Set up mdbook
uses: ./setup-mdbook
- run: mdbook --version
- run: mdbook-linkcheck --version

tests_complete:
name: All tests
if: always()
needs: [setup_uv_default, setup_uv_version, setup_uv_lockfile]
needs:
- setup_uv_default
- setup_uv_version
- setup_uv_lockfile
- setup_mdbook
runs-on: ubuntu-latest

steps:
Expand Down
5 changes: 2 additions & 3 deletions setup-mdbook/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ inputs:
description: 'Download executables for the given platform.'
required: false
default: x86_64-unknown-linux-gnu

runs:
using: "composite"
steps:
Expand All @@ -28,9 +28,8 @@ runs:
curl -sSL "https://github.com/rust-lang/mdBook/releases/download/v${{ inputs.mdbook_version }}/mdbook-v${{ inputs.mdbook_version }}-${{ inputs.platform }}.tar.gz" | tar -xvz --directory "$HOME/.cargo/bin"
shell: bash
- name: Install mdbook-linkcheck
if: ${{ inputs.linkcheck == 'true' }}
run: |
curl -sSL "https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v${{ inputs.linkcheck_version }}/mdbook-linkcheck.#{{ inputs.platform }}.zip" -o mdbook-linkcheck.zip
curl -sSL "https://github.com/Michael-F-Bryan/mdbook-linkcheck/releases/download/v${{ inputs.linkcheck_version }}/mdbook-linkcheck.${{ inputs.platform }}.zip" -o mdbook-linkcheck.zip
unzip mdbook-linkcheck.zip -d "$HOME/.cargo/bin"
chmod a+x "$HOME/.cargo/bin/mdbook-linkcheck"
shell: bash

0 comments on commit 4ad4de6

Please sign in to comment.