Skip to content

Commit

Permalink
ci: Handle errors in mdbook.
Browse files Browse the repository at this point in the history
  • Loading branch information
jetuk committed Dec 11, 2024
1 parent 4263779 commit 7f75a73
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/deploy-book.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@ jobs:
echo `pwd`/mdbook >> $GITHUB_PATH
- name: Build Book
run: |
# This assumes your book is in the root of your repository.
# Just add a `cd` here if you need to change to another directory.
mdbook build ./pywr-book
output=$(mdbook build ./pywr-book 2>&1)
if echo "$output" | grep -q "\[ERROR\]" ; then
exit 1
fi
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,17 @@ jobs:
run: cargo build --verbose --features highs,cbc --workspace --exclude ipm-simd --exclude pywr-python
- name: Run tests
run: cargo test --features highs,cbc --verbose --lib --bins -- --test-threads=1
- name: Run mdbook tests
run: mdbook test ./pywr-book
- name: Run mdbook test & build
run: |
output=$(mdbook test ./pywr-book 2>&1)
if echo "$output" | grep -q "\[ERROR\]" ; then
exit 1
fi
output=$(mdbook build ./pywr-book 2>&1)
if echo "$output" | grep -q "\[ERROR\]" ; then
exit 1
fi
build_schema_only:

Expand Down

0 comments on commit 7f75a73

Please sign in to comment.