-
Notifications
You must be signed in to change notification settings - Fork 5
78 lines (67 loc) · 2.05 KB
/
test_mysql.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
name: Test on MySQL
on: [ push ]
env:
DB_DATABASE: s2_rose_test
DB_USER: root
DB_PASSWORD: root
jobs:
build:
strategy:
fail-fast: false
matrix:
operating_system: ['ubuntu-20.04']
mysql_versions:
- 'mariadb-10.2'
- 'mariadb-10.3'
- 'mariadb-10.4'
- 'mariadb-10.5'
- 'mariadb-10.6'
- 'mariadb-10.7'
- 'mariadb-10.8'
- 'mariadb-10.9'
- 'mariadb-10.10'
- 'mariadb-10.11'
- 'mariadb-11.0'
- 'mariadb-11.1'
- '5.7'
- '8.0'
- '8.1'
php_versions:
- '7.4'
include:
-
operating_system: 'ubuntu-20.04'
php_versions: 8.0
mysql_versions: 'mariadb-10.7'
-
operating_system: 'ubuntu-22.04'
php_versions: 8.1
mysql_versions: '8.0'
-
operating_system: 'ubuntu-22.04'
php_versions: 8.2
mysql_versions: '8.1'
runs-on: '${{ matrix.operating_system }}'
steps:
- uses: actions/checkout@v3
- uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: ${{ matrix.mysql_versions }}
root-password: ${{ env.DB_PASSWORD }}
- name: 'Setup MySQL'
run: |
mysql -e 'SELECT version();' -u${{ env.DB_USER }} -h127.0.0.1 -p${{ env.DB_PASSWORD }}
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -h127.0.0.1 -p${{ env.DB_PASSWORD }}
- name: 'Setup PHP'
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php_versions }}
- name: Install dependencies
run: COMPOSER_MEMORY_LIMIT=-1 composer install --prefer-dist --no-interaction
- name: Prepare config
run: cp tests/config.php.dist.mysql tests/config.php
- name: Run test cases
run: php bin/codecept run --skip-group profile
- name: Run profiling
if: success() || failure()
run: php bin/codecept run -g profile -d