Skip to content

Commit 0ce3d7c

Browse files
committed
ci: run tests with tarantool CE master
1 parent d57efd4 commit 0ce3d7c

File tree

1 file changed

+33
-2
lines changed

1 file changed

+33
-2
lines changed

.github/workflows/testing.yml

Lines changed: 33 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,43 @@ 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: ${{ github.workspace }}/bin
86+
key: cache-latest-${{ env.LATEST_COMMIT }}
87+
88+
- name: Setup Tarantool master
89+
if: matrix.tarantool == 'master' && steps.cache-latest.outputs.cache-hit != 'true'
90+
run: |
91+
tt init
92+
tt install tarantool master
93+
94+
- name: Add Tarantool master to PATH
95+
if: matrix.tarantool == 'master'
96+
run: echo "${GITHUB_WORKSPACE}/bin" >> $GITHUB_PATH
97+
6598
- name: Setup Python for tests
6699
uses: actions/setup-python@v4
67100
with:
@@ -86,8 +119,6 @@ jobs:
86119

87120
- name: Install the crud module for testing purposes
88121
run: |
89-
curl -L https://tarantool.io/release/2/installer.sh | bash
90-
sudo apt install -y tt
91122
tt rocks install crud
92123
93124
- name: Run tests

0 commit comments

Comments
 (0)