diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 496da84e2..f758d8a60 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/test.bash b/test.bash index 75bf9557c..825495339 100755 --- a/test.bash +++ b/test.bash @@ -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