Skip to content

Commit 8c53202

Browse files
ci: add clean and build to book test
1 parent c18f3b7 commit 8c53202

1 file changed

Lines changed: 20 additions & 2 deletions

File tree

.github/workflows/book.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ on:
88
type: boolean
99
required: false
1010
default: true
11+
clean-options:
12+
description: Options for `cargo clean`, only executed when options are specified.
13+
type: string
14+
required: false
15+
default: ''
16+
build-options:
17+
description: Options for `cargo build`, only executed when options are specified.
18+
type: string
19+
required: false
20+
default: ''
1121

1222
permissions:
1323
contents: read
@@ -32,8 +42,16 @@ jobs:
3242
- name: Install mdBook
3343
run: cargo binstall --force -y mdbook mdbook-tabs mdbook-trunk
3444

45+
- name: Clean dependencies
46+
if: ${{ inputs.clean-options != '' }}
47+
run: cargo clean ${{ inputs.clean-options}}
48+
49+
- name: Build dependencies
50+
if: ${{ inputs.build-options != '' }}
51+
run: cargo build ${{ inputs.build-options }}
52+
3553
- name: Run tests
36-
run: mdbook test
54+
run: mdbook test -L ../target/debug/deps
3755
working-directory: book
3856

3957
build:
@@ -71,7 +89,7 @@ jobs:
7189
working-directory: book
7290

7391
- name: Copy Book Output
74-
if: ${{ inputs.combine == 'false' }})
92+
if: ${{ inputs.combine == 'false' }}
7593
run: rm -rf dist && cp -r book dist
7694
working-directory: book
7795

0 commit comments

Comments
 (0)