Skip to content

Commit

Permalink
test cache is set
Browse files Browse the repository at this point in the history
  • Loading branch information
nha committed Apr 1, 2024
1 parent 692d986 commit 9f2dee6
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions .github/workflows/check_url.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
steps:

- name: Setup Babashka
id: setup-babashka
id: setup-babashka-1
uses: turtlequeue/setup-babashka@feat/cache
with:
babashka-version: 1.3.189
Expand All @@ -28,6 +28,17 @@ jobs:
- name: Check if bb runs fine from cache
run: bb --version

- name: Test Cache
run: |
if [ -z "${{ steps.setup-babashka-1.outputs.cache-hit }}" ]; then
echo "Cache-hit output not set in first run. Failing the job."
exit 1
elif [ "${{ steps.setup-babashka-2.outputs.cache-hit }}" != "true" ]; then
echo "Cache not used in the second run. Failing the job."
exit 1
fi
shell: bash

check-url:
runs-on: ubuntu-latest
timeout-minutes: 10
Expand All @@ -36,7 +47,7 @@ jobs:
babashka-url: ['https://github.com/babashka/babashka/releases/download/v1.3.189/babashka-1.3.189-linux-amd64-static.tar.gz']
steps:
- name: Setup Babashka
id: setup-babashka
id: setup-babashka-1
uses: turtlequeue/setup-babashka@feat/cache
with:
babashka-version: 1.3.189
Expand All @@ -56,6 +67,17 @@ jobs:
- name: Check if bb runs fine from cache
run: bb --version

- name: Test Cache
run: |
if [ -z "${{ steps.setup-babashka-1.outputs.cache-hit }}" ]; then
echo "Cache-hit output not set in first run. Failing the job."
exit 1
elif [ "${{ steps.setup-babashka-2.outputs.cache-hit }}" != "true" ]; then
echo "Cache not used in the second run. Failing the job."
exit 1
fi
shell: bash

check-windows:
# https://ci.appveyor.com/project/borkdude/babashka
runs-on: windows-latest
Expand All @@ -64,7 +86,7 @@ jobs:
babashka-url: ['https://ci.appveyor.com/api/buildjobs/hgg0343wy6uj4xog/artifacts/babashka-1.3.190-SNAPSHOT-windows-amd64.zip']
steps:
- name: Setup Babashka
id: setup-babashka
id: setup-babashka-1
uses: turtlequeue/setup-babashka@feat/cache

with:
Expand Down

0 comments on commit 9f2dee6

Please sign in to comment.