Skip to content

Commit 02818fb

Browse files
committed
ci: run tests with tarantool CE master
1 parent d57efd4 commit 02818fb

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

.github/workflows/testing.yml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
- '2.8'
2828
- '2.10'
2929
- '2.11'
30+
- 'master'
3031
python:
3132
- '3.6'
3233
- '3.7'
@@ -57,11 +58,45 @@ jobs:
5758
- name: Clone the connector
5859
uses: actions/checkout@v3
5960

61+
- name: Setup tt
62+
run: |
63+
curl -L https://tarantool.io/release/2/installer.sh | sudo bash
64+
sudo apt install -y tt
65+
tt version
66+
6067
- name: Install tarantool ${{ matrix.tarantool }}
68+
if: matrix.tarantool != 'master'
6169
uses: tarantool/setup-tarantool@v2
6270
with:
6371
tarantool-version: ${{ matrix.tarantool }}
6472

73+
- name: Get Tarantool master latest commit
74+
if: matrix.tarantool == 'master'
75+
run: |
76+
commit_hash=$(git ls-remote https://github.com/tarantool/tarantool.git --branch master | head -c 8)
77+
echo "LATEST_COMMIT=${commit_hash}" >> $GITHUB_ENV
78+
shell: bash
79+
80+
- name: Cache Tarantool master
81+
if: matrix.tarantool == 'master'
82+
id: cache-latest
83+
uses: actions/cache@v3
84+
with:
85+
path: |
86+
${{ github.workspace }}/bin
87+
${{ github.workspace }}/include
88+
key: cache-latest-${{ env.LATEST_COMMIT }}
89+
90+
- name: Setup Tarantool master
91+
if: matrix.tarantool == 'master' && steps.cache-latest.outputs.cache-hit != 'true'
92+
run: |
93+
tt init
94+
tt install tarantool master
95+
96+
- name: Add Tarantool master to PATH
97+
if: matrix.tarantool == 'master'
98+
run: echo "${GITHUB_WORKSPACE}/bin" >> $GITHUB_PATH
99+
65100
- name: Setup Python for tests
66101
uses: actions/setup-python@v4
67102
with:
@@ -86,8 +121,6 @@ jobs:
86121

87122
- name: Install the crud module for testing purposes
88123
run: |
89-
curl -L https://tarantool.io/release/2/installer.sh | bash
90-
sudo apt install -y tt
91124
tt rocks install crud
92125
93126
- name: Run tests

0 commit comments

Comments
 (0)