Skip to content

Commit

Permalink
fix (demo): Install sharkdp/bat & stop if docs/use demo scripts fail (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
vorburger committed May 6, 2023
1 parent 7fdcefb commit f2606d9
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# https://github.com/awalsh128/cache-apt-pkgs-action
- uses: awalsh128/cache-apt-pkgs-action@v1.3.0
with:
# https://github.com/sharkdp/bat (used in some docs/use/**/script)
packages: bat
# Increase version every time packages change!
version: 1.0
# https://github.com/sharkdp/bat/issues/982
- run: sudo ln -s /usr/bin/batcat /usr/local/bin/bat
- uses: actions/cache@v3
with:
# https://github.com/actions/cache/pull/575/files
Expand Down
3 changes: 2 additions & 1 deletion test.bash
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ echo $ b build //...
bazelisk build //...

# TODO Replace with docs/use/**/BUILD files, so that demo tests only run if inputs change
find docs/use -maxdepth 1 -not -path docs/use -type d -exec tools/demo/test.bash {} \;
# Note use of xargs instead of find -exec \; for error handling, see https://apple.stackexchange.com/a/49047
find docs/use -maxdepth 1 -not -path docs/use -type d -print0 | xargs -n 1 -0 tools/demo/test.bash

# Check if https://pre-commit.com is available (and try to install it not)
if ! [ -e "./.venv/bin/pre-commit" ]; then
Expand Down

0 comments on commit f2606d9

Please sign in to comment.