-
-
Notifications
You must be signed in to change notification settings - Fork 22
108 lines (94 loc) · 3.87 KB
/
qa.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: QA
on:
push:
pull_request:
workflow_dispatch:
schedule:
- cron: '40 2 * * *'
jobs:
tests:
env:
TNT_IMAGE: tarantool/tarantool:3.1
PHP_IMAGE: php:8.3-cli
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
env:
- TNT_IMAGE: tarantool/tarantool:3.0
- TNT_IMAGE: tarantool/tarantool:2.11
- TNT_IMAGE: tarantool/tarantool:2.10
- TNT_IMAGE: tarantool/tarantool:2.8
- TNT_IMAGE: tarantool/tarantool:2.7
- TNT_IMAGE: tarantool/tarantool:2.6
- TNT_IMAGE: tarantool/tarantool:2.5
- TNT_IMAGE: tarantool/tarantool:2.4
- TNT_IMAGE: tarantool/tarantool:2.3
- TNT_IMAGE: tarantool/tarantool:2.2
- TNT_IMAGE: tarantool/tarantool:2.1
- TNT_IMAGE: tarantool/tarantool:1
- TNT_IMAGE: tarantool/tarantool:1.9
- TNT_IMAGE: tarantool/tarantool:1.7
- PHP_IMAGE: php:8.3-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock
- PHP_IMAGE: php:8.2-cli
- PHP_IMAGE: php:8.2-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock
- PHP_IMAGE: php:8.1-cli
- PHP_IMAGE: php:8.1-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock
- PHP_IMAGE: php:8.0-cli
- PHP_IMAGE: php:8.0-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock
- PHP_IMAGE: php:7.4-cli
- PHP_IMAGE: php:7.4-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock
- PHP_IMAGE: php:7.3-cli
QA: 1
- PHP_IMAGE: php:7.3-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock
- PHP_IMAGE: php:7.2-cli
- PHP_IMAGE: php:7.2-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock
- COVERAGE_FILE: coverage.clover
# scrutinizer doesn't support PHP 8
PHP_IMAGE: php:7.4-cli
- COVERAGE_FILE: coverage.clover
# scrutinizer doesn't support PHP 8
PHP_IMAGE: php:7.4-cli
EXT_DISABLE_DECIMAL: true
- COVERAGE_FILE: coverage.clover
# scrutinizer doesn't support PHP 8
PHP_IMAGE: php:7.4-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock
- COVERAGE_FILE: coverage.clover
# scrutinizer doesn't support PHP 8
PHP_IMAGE: php:7.4-cli
# some tests are skipped on Tarantool > 2.8
TNT_IMAGE: tarantool/tarantool:2.8
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build docker image
env: ${{ matrix.env }}
run: ./dockerfile.sh | docker build -t client -
- name: Test
env: ${{ matrix.env }}
run: |
docker network create tarantool-php
docker run --net=tarantool-php --rm $TNT_IMAGE sh -c "tarantool --version"
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
docker run --net=tarantool-php --rm -v /tmp:/tmp -v $PWD:/client -w /client -e COMPOSER_ROOT_VERSION=dev-master client
- name: Check code quality
env: ${{ matrix.env }}
if: ${{ env.QA }}
run: |
docker run --net=tarantool-php --rm -v $PWD:/client -w /client client php vendor/bin/php-cs-fixer fix --dry-run --diff --verbose .
docker run --net=tarantool-php --rm -v $PWD:/client -w /client client php vendor/bin/psalm
- name: Upload code coverage to Scrutinizer
env: ${{ matrix.env }}
if: ${{ env.COVERAGE_FILE }}
run: |
curl -sSOL https://scrutinizer-ci.com/ocular.phar
docker run --net=tarantool-php --rm -v $PWD:/client -w /client client php ocular.phar code-coverage:upload --format=php-clover "$COVERAGE_FILE"