Skip to content

Commit 5a7db0b

Browse files
committed
[ci skip] add manual workflow
1 parent 447bec0 commit 5a7db0b

1 file changed

Lines changed: 139 additions & 0 deletions

File tree

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: Manual PHPUnit Test
2+
3+
on: [workflow_dispatch]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
tests:
10+
runs-on: ubuntu-24.04
11+
env:
12+
PHP_INI_VALUES: assert.exception=1, zend.assertions=1
13+
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
php: [ '8.2', '8.1', '8.0', '7.4', '7.3', '7.2', '7.1', '7.0', '5.6', '5.5', '5.4']
18+
DB: [ 'pdo/mysql', 'pdo/pgsql', 'pdo/sqlite', 'mysqli', 'pgsql', 'sqlite' ]
19+
compiler: [ default ]
20+
include:
21+
- php: '8.2'
22+
DB: 'pdo/mysql'
23+
compiler: jit
24+
- php: '8.2'
25+
DB: 'pdo/pgsql'
26+
compiler: jit
27+
- php: '8.2'
28+
DB: 'pdo/sqlite'
29+
compiler: jit
30+
- php: '8.2'
31+
DB: 'mysqli'
32+
compiler: jit
33+
- php: '8.2'
34+
DB: 'pgsql'
35+
compiler: jit
36+
- php: '8.2'
37+
DB: 'sqlite'
38+
compiler: jit
39+
- php: '8.1'
40+
DB: 'pdo/mysql'
41+
compiler: jit
42+
- php: '8.1'
43+
DB: 'pdo/pgsql'
44+
compiler: jit
45+
- php: '8.1'
46+
DB: 'pdo/sqlite'
47+
compiler: jit
48+
- php: '8.1'
49+
DB: 'mysqli'
50+
compiler: jit
51+
- php: '8.1'
52+
DB: 'pgsql'
53+
compiler: jit
54+
- php: '8.1'
55+
DB: 'sqlite'
56+
compiler: jit
57+
- php: '8.0'
58+
DB: 'pdo/mysql'
59+
compiler: jit
60+
- php: '8.0'
61+
DB: 'pdo/pgsql'
62+
compiler: jit
63+
- php: '8.0'
64+
DB: 'pdo/sqlite'
65+
compiler: jit
66+
- php: '8.0'
67+
DB: 'mysqli'
68+
compiler: jit
69+
- php: '8.0'
70+
DB: 'pgsql'
71+
compiler: jit
72+
- php: '8.0'
73+
DB: 'sqlite'
74+
compiler: jit
75+
- php: '5.6'
76+
DB: 'mysql'
77+
compiler: default
78+
- php: '5.5'
79+
DB: 'mysql'
80+
compiler: default
81+
- php: '5.4'
82+
DB: 'mysql'
83+
compiler: default
84+
85+
services:
86+
postgres:
87+
image: postgres:12
88+
env:
89+
POSTGRES_USER: postgres
90+
POSTGRES_PASSWORD: postgres
91+
POSTGRES_DB: ci_test
92+
ports:
93+
- 5432:5432
94+
options: --health-cmd=pg_isready --health-interval=10s --health-timeout=5s --health-retries=3
95+
96+
mysql:
97+
image: mysql:5.7
98+
env:
99+
MYSQL_ALLOW_EMPTY_PASSWORD: true
100+
MYSQL_USER: travis
101+
MYSQL_PASSWORD: travis
102+
MYSQL_DATABASE: ci_test
103+
ports:
104+
- 3306:3306
105+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
106+
107+
steps:
108+
- name: Checkout
109+
uses: actions/checkout@v3
110+
- name: Override PHP ini values for JIT compiler
111+
if: matrix.compiler == 'jit'
112+
run: echo "PHP_INI_VALUES::assert.exception=1, zend.assertions=1, opcache.enable=1, opcache.enable_cli=1, opcache.optimization_level=-1, opcache.jit=1255, opcache.jit_buffer_size=64M" >> $GITHUB_ENV
113+
114+
- name: Install PHP${{ matrix.php }} - DB ${{ matrix.DB }}
115+
uses: shivammathur/setup-php@v2
116+
with:
117+
php-version: ${{ matrix.php }}
118+
tools: composer, pecl
119+
extensions: imagick, sqlite3, pgsql, mysqli, pdo, pdo_mysql, pdo_pgsql, pdo_sqlite, mbstring
120+
ini-values: ${{ env.PHP_INI_VALUES }}
121+
coverage: xdebug
122+
123+
- name: Get composer cache directory
124+
id: composer-cache
125+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
126+
- name: Cache composer dependencies
127+
uses: actions/cache@v3
128+
with:
129+
path: ${{ steps.composer-cache.outputs.dir }}
130+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
131+
restore-keys: ${{ runner.os }}-composer-
132+
- name: Install composer dependencies
133+
run: composer install --no-progress --prefer-dist --optimize-autoloader
134+
135+
- name: PHPUnit Test
136+
run: |
137+
php -d error_reporting=E_ALL -d zend.enable_gc=0 -d date.timezone=UTC -d mbstring.func_overload=7 -d mbstring.internal_encoding=UTF-8 vendor/bin/phpunit --coverage-text --configuration tests/travis/${{ matrix.DB }}.phpunit.xml
138+
env:
139+
XDEBUG_MODE: coverage

0 commit comments

Comments
 (0)