-
Notifications
You must be signed in to change notification settings - Fork 4
41 lines (35 loc) · 1.15 KB
/
self_check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# name: Self check
on: [push]
jobs:
check:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
babashka-version: [1.1.172, 1.3.189]
steps:
- name: Setup Babashka
id: setup-babashka-1
uses: turtlequeue/setup-babashka@main
with:
babashka-version: ${{ matrix.babashka-version }}
- name: Check if bb runs fine
run: bb --version
- name: Setup Babashka from cache
id: setup-babashka-2
uses: turtlequeue/setup-babashka@main
with:
babashka-version: ${{ matrix.babashka-version }}
fail-on-cache-miss: true
- 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