-
Notifications
You must be signed in to change notification settings - Fork 4
120 lines (102 loc) · 3.58 KB
/
check_url.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
on: [push]
jobs:
check:
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
steps:
- name: Setup Babashka
id: setup-babashka-1
uses: turtlequeue/setup-babashka@feat/cache
with:
babashka-version: 1.3.189
- name: Check if bb runs fine
run: bb --version
- name: Setup Babashka from cache
id: setup-babashka-2
uses: turtlequeue/setup-babashka@feat/cache
with:
babashka-version: 1.3.189
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
check-url:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
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-1
uses: turtlequeue/setup-babashka@feat/cache
with:
babashka-version: 1.3.189
babashka-url: ${{ matrix.babashka-url }}
- name: Check if bb runs fine
run: bb --version
- name: Setup Babashka from cache
id: setup-babashka-2
uses: turtlequeue/setup-babashka@feat/cache
with:
babashka-version: 1.3.189
babashka-url: ${{ matrix.babashka-url }}
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
check-windows:
# https://ci.appveyor.com/project/borkdude/babashka
runs-on: windows-latest
strategy:
matrix:
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-1
uses: turtlequeue/setup-babashka@feat/cache
with:
babashka-version: 1.3.190-SNAPSHOT
babashka-url: ${{ matrix.babashka-url }}
- name: Check if bb runs fine
run: bb --version
- name: Setup Babashka from cache
id: setup-babashka-2
uses: turtlequeue/setup-babashka@feat/cache
with:
babashka-version: 1.3.190-SNAPSHOT
babashka-url: ${{ matrix.babashka-url }}
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