Skip to content

Commit 9b02251

Browse files
authored
Add tarantool v3.x to the test matrix (#98)
1 parent 6a79c74 commit 9b02251

File tree

5 files changed

+38
-35
lines changed

5 files changed

+38
-35
lines changed

.github/workflows/qa.yml

+33-28
Original file line numberDiff line numberDiff line change
@@ -9,36 +9,54 @@ on:
99
jobs:
1010
tests:
1111
env:
12-
TNT_IMAGE: tarantool/tarantool:2.11
13-
PHP_IMAGE: php:8.2-cli
12+
TNT_IMAGE: tarantool/tarantool:3.1
13+
PHP_IMAGE: php:8.3-cli
1414
strategy:
1515
fail-fast: false
1616
matrix:
1717
operating-system: [ubuntu-latest]
1818
env:
19-
- PHP_IMAGE: php:7.2-cli
20-
- PHP_IMAGE: php:7.2-cli
19+
- TNT_IMAGE: tarantool/tarantool:3.0
20+
- TNT_IMAGE: tarantool/tarantool:2.11
21+
- TNT_IMAGE: tarantool/tarantool:2.10
22+
- TNT_IMAGE: tarantool/tarantool:2.8
23+
- TNT_IMAGE: tarantool/tarantool:2.7
24+
- TNT_IMAGE: tarantool/tarantool:2.6
25+
- TNT_IMAGE: tarantool/tarantool:2.5
26+
- TNT_IMAGE: tarantool/tarantool:2.4
27+
- TNT_IMAGE: tarantool/tarantool:2.3
28+
- TNT_IMAGE: tarantool/tarantool:2.2
29+
- TNT_IMAGE: tarantool/tarantool:2.1
30+
- TNT_IMAGE: tarantool/tarantool:1
31+
- TNT_IMAGE: tarantool/tarantool:1.9
32+
- TNT_IMAGE: tarantool/tarantool:1.7
33+
34+
- PHP_IMAGE: php:8.3-cli
2135
TNT_LISTEN_URI: /tmp/tarantool_client.sock
2236

23-
- PHP_IMAGE: php:7.3-cli
24-
QA: 1
25-
- PHP_IMAGE: php:7.3-cli
37+
- PHP_IMAGE: php:8.2-cli
38+
- PHP_IMAGE: php:8.2-cli
2639
TNT_LISTEN_URI: /tmp/tarantool_client.sock
2740

28-
- PHP_IMAGE: php:7.4-cli
29-
- PHP_IMAGE: php:7.4-cli
41+
- PHP_IMAGE: php:8.1-cli
42+
- PHP_IMAGE: php:8.1-cli
3043
TNT_LISTEN_URI: /tmp/tarantool_client.sock
3144

3245
- PHP_IMAGE: php:8.0-cli
3346
- PHP_IMAGE: php:8.0-cli
3447
TNT_LISTEN_URI: /tmp/tarantool_client.sock
3548

36-
- PHP_IMAGE: php:8.1-cli
37-
- PHP_IMAGE: php:8.1-cli
49+
- PHP_IMAGE: php:7.4-cli
50+
- PHP_IMAGE: php:7.4-cli
3851
TNT_LISTEN_URI: /tmp/tarantool_client.sock
3952

40-
- PHP_IMAGE: php:8.3-cli
41-
- PHP_IMAGE: php:8.3-cli
53+
- PHP_IMAGE: php:7.3-cli
54+
QA: 1
55+
- PHP_IMAGE: php:7.3-cli
56+
TNT_LISTEN_URI: /tmp/tarantool_client.sock
57+
58+
- PHP_IMAGE: php:7.2-cli
59+
- PHP_IMAGE: php:7.2-cli
4260
TNT_LISTEN_URI: /tmp/tarantool_client.sock
4361

4462
- COVERAGE_FILE: coverage.clover
@@ -58,33 +76,20 @@ jobs:
5876
# some tests are skipped on Tarantool > 2.8
5977
TNT_IMAGE: tarantool/tarantool:2.8
6078

61-
- TNT_IMAGE: tarantool/tarantool:1.7
62-
- TNT_IMAGE: tarantool/tarantool:1.9
63-
- TNT_IMAGE: tarantool/tarantool:1
64-
- TNT_IMAGE: tarantool/tarantool:2.1
65-
- TNT_IMAGE: tarantool/tarantool:2.2
66-
- TNT_IMAGE: tarantool/tarantool:2.3
67-
- TNT_IMAGE: tarantool/tarantool:2.4
68-
- TNT_IMAGE: tarantool/tarantool:2.5
69-
- TNT_IMAGE: tarantool/tarantool:2.6
70-
- TNT_IMAGE: tarantool/tarantool:2.7
71-
- TNT_IMAGE: tarantool/tarantool:2.8
72-
- TNT_IMAGE: tarantool/tarantool:2.10
73-
7479
runs-on: ${{ matrix.operating-system }}
7580
steps:
7681
- name: Checkout
7782
uses: actions/checkout@v4
7883

7984
- name: Build docker image
8085
env: ${{ matrix.env }}
81-
run: ./dockerfile.sh | tee /dev/tty | docker build -t client -
86+
run: ./dockerfile.sh | docker build -t client -
8287

8388
- name: Test
8489
env: ${{ matrix.env }}
8590
run: |
8691
docker network create tarantool-php
87-
docker run --net=tarantool-php --rm $TNT_IMAGE /usr/local/bin/tarantool --version
92+
docker run --net=tarantool-php --rm $TNT_IMAGE sh -c "tarantool --version"
8893
docker run --net=tarantool-php -d --name=tarantool -v /tmp:/tmp -v $PWD/tests/Integration/client.lua:/client.lua -e TNT_LISTEN_URI=$TNT_LISTEN_URI $TNT_IMAGE tarantool /client.lua
8994
docker run --net=tarantool-php --rm -v /tmp:/tmp -v $PWD:/client -w /client -e COMPOSER_ROOT_VERSION=dev-master client
9095

.github/workflows/reusable_qa.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
run: sudo dpkg -i tarantool*.deb
3030

3131
- name: Build docker image with connector setup
32-
run: ./dockerfile.sh | tee /dev/tty | docker build -t client -
32+
run: ./dockerfile.sh | docker build -t client -
3333
env:
3434
TNT_LISTEN_URI: localhost:3301
3535

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -702,11 +702,11 @@ First, create a container:
702702
./dockerfile.sh | docker build -t client -
703703
```
704704

705-
The command above will create a container named `client` with PHP 8.2 runtime.
705+
The command above will create a container named `client` with PHP 8.3 runtime.
706706
You may change the default runtime by defining the `PHP_IMAGE` environment variable:
707707

708708
```bash
709-
PHP_IMAGE='php:8.1-cli' ./dockerfile.sh | docker build -t client -
709+
PHP_IMAGE='php:8.2-cli' ./dockerfile.sh | docker build -t client -
710710
```
711711

712712
> *See a list of various images [here](https://hub.docker.com/_/php).*
@@ -718,7 +718,7 @@ Then run a Tarantool instance (needed for integration tests):
718718
docker network create tarantool-php
719719
docker run -d --net=tarantool-php -p 3301:3301 --name=tarantool \
720720
-v $(pwd)/tests/Integration/client.lua:/client.lua \
721-
tarantool/tarantool:2 tarantool /client.lua
721+
tarantool/tarantool:3 tarantool /client.lua
722722
```
723723

724724
And then run both unit and integration tests:

dockerfile.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/usr/bin/env bash
22

33
if [[ -z "$PHP_IMAGE" ]]; then
4-
PHP_IMAGE='php:8.2-cli'
4+
PHP_IMAGE='php:8.3-cli'
55
fi
66

77
if [[ -z "$TNT_LISTEN_URI" ]]; then

tests/Integration/client.lua

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@ local listen = os.getenv('TNT_LISTEN_URI')
55
box.cfg {
66
listen = (listen == '' or listen == nil) and 3301 or listen,
77
log_level = 6,
8-
wal_mode = 'none',
9-
snap_dir = '/tmp'
108
}
119

1210
box.schema.user.grant('guest', 'read,write,execute,create,drop,alter', 'universe', nil, {if_not_exists = true})

0 commit comments

Comments
 (0)