1616 env :
1717 SYMFONY_REQUIRE : ${{ matrix.symfony }}
1818 SYMFONY_DEPRECATIONS_HELPER : ${{ matrix.symfony-deprecations }}
19- PARAM_DB_DRIVER : ${{ matrix.db-driver }}
19+ DB_DSN_MYSQL : mysql://test:test@127.0.0.1/craue_form_flow_tests
20+ DB_DSN_POSTGRESQL : pgsql://test:test@127.0.0.1/craue_form_flow_tests
21+ DB_DSN_SQLITE : sqlite:///sqlite.db
2022
2123 strategy :
2224 fail-fast : false
3133 -
3234 php : ' 7.3'
3335 symfony : ' 4.4.*'
34- -
35- php : ' 7.3'
36- symfony : ' 4.4.*'
37- note : sqlite
38- db-driver : pdo_sqlite
3936 -
4037 php : ' 7.4'
4138 symfony : ' 5.4.*'
6057 stability : dev
6158 allow-failure : true
6259
60+ services :
61+ mysql :
62+ image : mysql:${{ (matrix.php == '7.3' && '5.7') || '8.0' }}
63+ env :
64+ MYSQL_USER : test
65+ MYSQL_PASSWORD : test
66+ MYSQL_DATABASE : craue_form_flow_tests
67+ MYSQL_ALLOW_EMPTY_PASSWORD : yes
68+ options : >-
69+ --health-cmd "mysqladmin ping --silent"
70+ --health-interval 5s
71+ --health-timeout 5s
72+ --health-retries 5
73+ ports :
74+ - 3306:3306
75+
76+ postgres :
77+ image : postgres
78+ env :
79+ POSTGRES_USER : test
80+ POSTGRES_PASSWORD : test
81+ POSTGRES_DB : craue_form_flow_tests
82+ options : >-
83+ --health-cmd pg_isready
84+ --health-interval 5s
85+ --health-timeout 5s
86+ --health-retries 5
87+ ports :
88+ - 5432:5432
89+
6390 steps :
6491 - name : checkout
6592 uses : actions/checkout@v3
6895 uses : shivammathur/setup-php@v2
6996 with :
7097 php-version : ${{ matrix.php }}
71- extensions : mysql, redis
98+ extensions : pdo_mysql, pdo_pgsql, pdo_sqlite
7299 coverage : pcov
73- ini-values : memory_limit=-1
100+ ini-values : memory_limit=-1, variables_order="EGPCS"
74101 tools : flex
75102 env :
76103 fail-fast : true # interrupt on extension setup error
@@ -91,7 +118,25 @@ jobs:
91118 composer-options : --prefer-dist
92119
93120 - name : run PHPUnit
94- run : vendor/bin/phpunit -v --coverage-clover build/logs/clover.xml
121+ run : vendor/bin/phpunit -v --coverage-clover build/logs/clover.xml --exclude-group run-with-multiple-databases-only
122+
123+ - name : run PHPUnit with MySQL
124+ if : always()
125+ run : vendor/bin/phpunit -v --coverage-clover build/logs/clover-mysql.xml --group run-with-multiple-databases,run-with-multiple-databases-only
126+ env :
127+ DB_FLAVOR : mysql
128+
129+ - name : run PHPUnit with PostgreSQL
130+ if : always()
131+ run : vendor/bin/phpunit -v --coverage-clover build/logs/clover-postgresql.xml --group run-with-multiple-databases,run-with-multiple-databases-only
132+ env :
133+ DB_FLAVOR : postgresql
134+
135+ - name : run PHPUnit with SQLite
136+ if : always()
137+ run : vendor/bin/phpunit -v --coverage-clover build/logs/clover-sqlite.xml --group run-with-multiple-databases,run-with-multiple-databases-only
138+ env :
139+ DB_FLAVOR : sqlite
95140
96141 - name : upload code coverage data
97142 if : github.repository == 'craue/CraueFormFlowBundle'
@@ -101,4 +146,4 @@ jobs:
101146 run : |
102147 unset SYMFONY_REQUIRE
103148 composer global require php-coveralls/php-coveralls
104- php-coveralls -- coverage_clover= build/logs/clover.xml -v
149+ php-coveralls -v -- coverage_clover " build/logs/clover* .xml"
0 commit comments