-
Notifications
You must be signed in to change notification settings - Fork 3
125 lines (109 loc) · 6.2 KB
/
unit-tests.yaml
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
---
name: Unit Tests
on:
pull_request:
branches: [master]
paths-ignore:
- 'docs/**'
workflow_call:
workflow_dispatch:
inputs:
composer-options:
description: "Composer options for ramsey/composer-install GitHub Action"
required: false
default: "--prefer-dist --no-scripts"
type: string
jobs:
lint_files:
uses: llaville/.github/.github/workflows/mega-linter.yml@master
with:
repository: ${{ github.repository }}
composer-options: ${{ inputs.composer-options }}
php-version: "8.1"
unit_tests:
needs: lint_files
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
-
os: ubuntu-20.04
php: 8.1
extensions: amqp,apcu,ast,bcmath,bz2,calendar,core,ctype,curl,date,dom,enchant,exif,fileinfo,filter,ftp,gd,gettext,gmp,hash,iconv,igbinary,imagick,imap,intl,json,ldap,libxml,lzf,mbstring,memcache,memcached,mongodb,msgpack,mysqli,oauth,oci8,opcache,openssl,opentelemetry,pcntl,pcre,pdo,pgsql,phar,posix,raphf,pecl_http,readline,redis,reflection,session,shmop,simplexml,sockets,solr,spl,sqlite3,ssh2-beta,standard,sysvmsg,sysvsem,sysvshm,tokenizer,uuid,xdebug,xhprof,xml,xmldiff,xmlreader,xmlwriter,xpass,xsl,yac,zip,zlib
tools: phpunit:10.5
continue-on-error: false
-
os: ubuntu-22.04
php: 8.2
extensions: amqp,apcu,ast,bcmath,bz2,calendar,core,ctype,curl,date,dom,enchant,exif,fileinfo,filter,ftp,gd,gettext,gmp,hash,iconv,igbinary,imagick,imap,intl,json,ldap,libxml,lzf,mbstring,memcache,memcached,mongodb,msgpack,mysqli,oauth,oci8,opcache,openssl,opentelemetry,pcntl,pcre,pdo,pgsql,phar,posix,random,raphf,pecl_http,readline,redis,reflection,session,shmop,simplexml,sockets,solr,spl,sqlite3,ssh2-beta,standard,sysvmsg,sysvsem,sysvshm,tokenizer,uuid,xdebug,xhprof,xml,xmldiff,xmlreader,xmlwriter,xpass,xsl,yac,zip,zlib
tools: phpunit:10.5
continue-on-error: false
-
os: ubuntu-22.04
php: 8.3
extensions: amqp,apcu,ast,bcmath,bz2,calendar,core,ctype,curl,date,dom,enchant,exif,fileinfo,filter,ftp,gd,gettext,gmp,hash,iconv,igbinary,imagick,imap,intl,json,ldap,libxml,lzf,mbstring,memcache,memcached,mongodb,msgpack,mysqli,oauth,oci8,opcache,openssl,pcntl,pcre,pdo,pgsql,phar,posix,random,raphf,pecl_http,readline,redis,reflection,session,shmop,simplexml,sockets,solr,spl,sqlite3,ssh2-beta,standard,sysvmsg,sysvsem,sysvshm,tokenizer,uuid,xdebug,xhprof,xml,xmldiff,xmlreader,xmlwriter,xpass,xsl,yac,zip,zlib
tools: phpunit:10.5
continue-on-error: false
-
os: ubuntu-22.04
php: 8.4
extensions: amqp,apcu,ast,bcmath,bz2,calendar,core,ctype,curl,date,dom,enchant,exif,fileinfo,filter,ftp,gd,gettext,gmp,hash,iconv,igbinary,imagick,imap,intl,json,ldap,libxml,lzf,mbstring,memcache,memcached,mongodb,msgpack,mysqli,oauth,oci8,opcache,openssl,pcntl,pcre,pdo,pgsql,phar,posix,random,raphf,pecl_http,readline,redis,reflection,session,shmop,simplexml,sockets,solr,spl,sqlite3,ssh2-beta,standard,sysvmsg,sysvsem,sysvshm,tokenizer,uuid,xdebug,xhprof,xml,xmldiff,xmlreader,xmlwriter,xpass,xsl,yac,zip,zlib
tools: phpunit:10.5
continue-on-error: true
name: Test DB References
env:
APP_ENV: dev # see explains at https://github.com/llaville/php-compatinfo-db/issues/101
DATABASE_URL: "sqlite:///%kernel.cache_dir%/compatinfo-db.sqlite"
steps:
- # https://github.com/actions/checkout
name: Checkout
uses: actions/checkout@v4
-
name: Setup Libraries
run: |
sudo apt-get update
sudo apt-fast install libcurl4-openssl-dev -y
sudo apt-fast install libssh2-1-dev -y
sudo apt-fast install librdkafka-dev -y
- # https://github.com/shivammathur/cache-extensions
name: Setup cache environment
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
key: cache-v6
- # https://github.com/actions/cache
name: Cache extensions
uses: actions/cache@v4
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}
- # https://github.com/shivammathur/setup-php
name: Setup PHP runtime
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
tools: ${{ matrix.tools }}
- # https://github.com/ramsey/composer-install
name: Install Composer dependencies
uses: ramsey/composer-install@v3
with:
dependency-versions: "highest"
composer-options: ${{ inputs.composer-options }}
-
name: Build Database
run: |
bin/compatinfo-db db:new --ansi
-
name: Check Database
run: |
bin/compatinfo-db diagnose --ansi
bin/compatinfo-db db:list --installed --ansi
- # https://github.com/sebastianbergmann/phpunit/tree/10.5
name: Unit tests with PHPUnit 10
run: phpunit --testdox --do-not-cache-result --no-progress
continue-on-error: ${{ matrix.continue-on-error }}