|
1 | | -# name: Simple url check |
2 | 1 | on: [push] |
3 | 2 |
|
4 | 3 | jobs: |
|
7 | 6 | timeout-minutes: 10 |
8 | 7 | strategy: |
9 | 8 | matrix: |
10 | | - os: [ubuntu-latest, ubuntu-20.04] |
| 9 | + os: [ubuntu-latest, windows-latest] |
| 10 | + steps: |
| 11 | + |
| 12 | + - name: Setup Babashka |
| 13 | + id: setup-babashka-1 |
| 14 | + uses: turtlequeue/setup-babashka@main |
| 15 | + with: |
| 16 | + babashka-version: 1.3.189 |
| 17 | + |
| 18 | + - name: Check if bb runs fine |
| 19 | + run: bb --version |
| 20 | + |
| 21 | + - name: Setup Babashka from cache |
| 22 | + id: setup-babashka-2 |
| 23 | + uses: turtlequeue/setup-babashka@main |
| 24 | + with: |
| 25 | + babashka-version: 1.3.189 |
| 26 | + fail-on-cache-miss: true |
| 27 | + |
| 28 | + - name: Check if bb runs fine from cache |
| 29 | + run: bb --version |
| 30 | + |
| 31 | + - name: Test Cache |
| 32 | + run: | |
| 33 | + if [ -z "${{ steps.setup-babashka-1.outputs.cache-hit }}" ]; then |
| 34 | + echo "Cache-hit output not set in first run. Failing the job." |
| 35 | + exit 1 |
| 36 | + elif [ "${{ steps.setup-babashka-2.outputs.cache-hit }}" != "true" ]; then |
| 37 | + echo "Cache not used in the second run. Failing the job." |
| 38 | + exit 1 |
| 39 | + fi |
| 40 | + shell: bash |
| 41 | + |
| 42 | + check-url: |
| 43 | + runs-on: ubuntu-latest |
| 44 | + timeout-minutes: 10 |
| 45 | + strategy: |
| 46 | + matrix: |
11 | 47 | babashka-url: ['https://github.com/babashka/babashka/releases/download/v1.3.189/babashka-1.3.189-linux-amd64-static.tar.gz'] |
12 | 48 | steps: |
13 | 49 | - name: Setup Babashka |
14 | | - id: setup-babashka |
| 50 | + id: setup-babashka-1 |
15 | 51 | uses: turtlequeue/setup-babashka@main |
16 | 52 | with: |
17 | 53 | babashka-version: 1.3.189 |
|
26 | 62 | with: |
27 | 63 | babashka-version: 1.3.189 |
28 | 64 | babashka-url: ${{ matrix.babashka-url }} |
| 65 | + fail-on-cache-miss: true |
29 | 66 |
|
30 | 67 | - name: Check if bb runs fine from cache |
31 | 68 | run: bb --version |
| 69 | + |
| 70 | + - name: Test Cache |
| 71 | + run: | |
| 72 | + if [ -z "${{ steps.setup-babashka-1.outputs.cache-hit }}" ]; then |
| 73 | + echo "Cache-hit output not set in first run. Failing the job." |
| 74 | + exit 1 |
| 75 | + elif [ "${{ steps.setup-babashka-2.outputs.cache-hit }}" != "true" ]; then |
| 76 | + echo "Cache not used in the second run. Failing the job." |
| 77 | + exit 1 |
| 78 | + fi |
| 79 | + shell: bash |
| 80 | + |
32 | 81 | check-windows: |
33 | 82 | # https://ci.appveyor.com/project/borkdude/babashka |
34 | 83 | runs-on: windows-latest |
|
37 | 86 | babashka-url: ['https://ci.appveyor.com/api/buildjobs/hgg0343wy6uj4xog/artifacts/babashka-1.3.190-SNAPSHOT-windows-amd64.zip'] |
38 | 87 | steps: |
39 | 88 | - name: Setup Babashka |
40 | | - id: setup-babashka |
| 89 | + id: setup-babashka-1 |
41 | 90 | uses: turtlequeue/setup-babashka@main |
| 91 | + |
42 | 92 | with: |
43 | 93 | babashka-version: 1.3.190-SNAPSHOT |
44 | 94 | babashka-url: ${{ matrix.babashka-url }} |
|
49 | 99 | - name: Setup Babashka from cache |
50 | 100 | id: setup-babashka-2 |
51 | 101 | uses: turtlequeue/setup-babashka@main |
| 102 | + |
52 | 103 | with: |
53 | 104 | babashka-version: 1.3.190-SNAPSHOT |
54 | 105 | babashka-url: ${{ matrix.babashka-url }} |
| 106 | + fail-on-cache-miss: true |
55 | 107 |
|
56 | 108 | - name: Check if bb runs fine from cache |
57 | 109 | run: bb --version |
| 110 | + |
| 111 | + - name: Test Cache |
| 112 | + run: | |
| 113 | + if [ -z "${{ steps.setup-babashka-1.outputs.cache-hit }}" ]; then |
| 114 | + echo "Cache-hit output not set in first run. Failing the job." |
| 115 | + exit 1 |
| 116 | + elif [ "${{ steps.setup-babashka-2.outputs.cache-hit }}" != "true" ]; then |
| 117 | + echo "Cache not used in the second run. Failing the job." |
| 118 | + exit 1 |
| 119 | + fi |
| 120 | + shell: bash |
0 commit comments