@@ -50,17 +50,43 @@ jobs:
5050 - name : Clone the connector
5151 uses : actions/checkout@v2
5252
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+
5358 - name : Setup Tarantool ${{ matrix.tarantool }}
5459 if : matrix.tarantool != '2.x-latest'
5560 uses : tarantool/setup-tarantool@v2
5661 with :
5762 tarantool-version : ${{ matrix.tarantool }}
5863
59- - name : Setup Tarantool 2.x ( latest)
64+ - name : Get Tarantool 2.x latest commit
6065 if : matrix.tarantool == '2.x-latest'
6166 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
6490
6591 - name : Setup golang for the connector and tests
6692 uses : actions/setup-go@v2
0 commit comments