@@ -50,17 +50,43 @@ jobs:
50
50
- name : Clone the connector
51
51
uses : actions/checkout@v2
52
52
53
+ - name : Setup tt
54
+ run : |
55
+ curl -L https://tarantool.io/release/2/installer.sh | sudo bash
56
+ sudo apt install -y tt
57
+
53
58
- name : Setup Tarantool ${{ matrix.tarantool }}
54
59
if : matrix.tarantool != '2.x-latest'
55
60
uses : tarantool/setup-tarantool@v2
56
61
with :
57
62
tarantool-version : ${{ matrix.tarantool }}
58
63
59
- - name : Setup Tarantool 2.x ( latest)
64
+ - name : Get Tarantool 2.x latest commit
60
65
if : matrix.tarantool == '2.x-latest'
61
66
run : |
62
- curl -L https://tarantool.io/pre-release/2/installer.sh | sudo bash
63
- sudo apt install -y tarantool tarantool-dev
67
+ commit_hash=$(git ls-remote https://github.com/tarantool/tarantool.git --branch master | head -c 8)
68
+ echo "LATEST_COMMIT=${commit_hash}" >> $GITHUB_ENV
69
+ shell : bash
70
+
71
+ - name : Cache Tarantool 2.x latest
72
+ if : matrix.tarantool == '2.x-latest'
73
+ id : cache-latest
74
+ uses : actions/cache@v3
75
+ with :
76
+ path : " /opt/tarantool"
77
+ key : cache-latest-${{ env.LATEST_COMMIT }}
78
+
79
+ - name : Setup Tarantool 2.x latest
80
+ if : matrix.tarantool == '2.x-latest' && steps.cache-latest.outputs.cache-hit != 'true'
81
+ run : |
82
+ # mkdir could be removed after:
83
+ # https://github.com/tarantool/tt/issues/282
84
+ sudo mkdir -p /opt/tarantool
85
+ sudo tt install tarantool=master
86
+
87
+ - name : Add Tarantool 2.x latest to PATH
88
+ if : matrix.tarantool == '2.x-latest'
89
+ run : echo "/opt/tarantool/bin" >> $GITHUB_PATH
64
90
65
91
- name : Setup golang for the connector and tests
66
92
uses : actions/setup-go@v2
0 commit comments