File tree Expand file tree Collapse file tree 4 files changed +71
-2
lines changed Expand file tree Collapse file tree 4 files changed +71
-2
lines changed Original file line number Diff line number Diff line change 1+ name : CI
2+
3+ on :
4+ push :
5+ branches :
6+ tags :
7+ pull_request :
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+ strategy :
13+ matrix :
14+ php : [7.1, 7.2, 7.3]
15+ services :
16+ mongo :
17+ image : mongo
18+ ports :
19+ - 27017:27017
20+ mysql :
21+ image : mysql:5.7
22+ ports :
23+ - 3307:3306
24+ env :
25+ MYSQL_ALLOW_EMPTY_PASSWORD : ' yes'
26+ MYSQL_DATABASE : ' unittest'
27+ MYSQL_ROOT_PASSWORD :
28+
29+ steps :
30+ - uses : actions/checkout@v1
31+ - name : Show php version
32+ run : php${{ matrix.php }} -v && composer -V
33+ - name : Show docker and docker-compose versions
34+ run : |
35+ docker version
36+ - name : Debug if needed
37+ run : if [[ "$DEBUG" == "true" ]]; then env; fi
38+ env :
39+ DEBUG : ${{secrets.DEBUG}}
40+ - name : Install dependencies
41+ run : |
42+ composer install --no-interaction
43+ - name : Generating code coverage
44+ run : |
45+ mkdir -p build/logs
46+ ./vendor/bin/phpunit --coverage-clover build/logs/clover.xml
47+ env :
48+ MONGO_HOST : 0.0.0.0
49+ MYSQL_HOST : 0.0.0.0
50+ MYSQL_PORT : 3307
51+ - name : Send coveralls
52+ run : vendor/bin/php-coveralls -v
53+ env :
54+ COVERALLS_REPO_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change 2929 "phpunit/phpunit" : " ^6.0|^7.0|^8.0" ,
3030 "orchestra/testbench" : " ^3.1|^4.0" ,
3131 "mockery/mockery" : " ^1.0" ,
32- "satooshi/php-coveralls" : " ^2.0" ,
33- "doctrine/dbal" : " ^2.5"
32+ "php-coveralls/php-coveralls" : " dev-add-support-for-github-actions" ,
33+ "doctrine/dbal" : " ^2.5" ,
34+ "phpunit/phpcov" : " 5.0.0"
3435 },
36+ "repositories" : [
37+ {
38+ "type" : " vcs" ,
39+ "url" : " https://github.com/Smolevich/php-coveralls"
40+ }
41+ ],
3542 "autoload" : {
3643 "psr-0" : {
3744 "Jenssegers\\ Mongodb" : " src/"
Original file line number Diff line number Diff line change 4040 <file >tests/ValidationTest.php</file >
4141 </testsuite >
4242 </testsuites >
43+ <filter >
44+ <whitelist processUncoveredFilesFromWhitelist =" true" >
45+ <directory suffix =" .php" >./src</directory >
46+ </whitelist >
47+ </filter >
4348 <php >
4449 <env name =" MONGO_HOST" value =" mongodb" />
4550 <env name =" MONGO_DATABASE" value =" unittest" />
4651 <env name =" MONGO_PORT" value =" 27017" />
4752 <env name =" MYSQL_HOST" value =" mysql" />
53+ <env name =" MYSQL_PORT" value =" 3306" />
4854 <env name =" MYSQL_DATABASE" value =" unittest" />
4955 <env name =" MYSQL_USERNAME" value =" root" />
5056 <env name =" QUEUE_CONNECTION" value =" database" />
Original file line number Diff line number Diff line change 22
33$ mongoHost = env ('MONGO_HOST ' , 'mongodb ' );
44$ mongoPort = env ('MONGO_PORT ' ) ? (int ) env ('MONGO_PORT ' ) : 27017 ;
5+ $ mysqlPort = env ('MYSQL_PORT ' ) ? (int ) env ('MYSQL_PORT ' ) : 3306 ;
56
67return [
78
2324 'mysql ' => [
2425 'driver ' => 'mysql ' ,
2526 'host ' => env ('MYSQL_HOST ' , 'mysql ' ),
27+ 'port ' => $ mysqlPort ,
2628 'database ' => env ('MYSQL_DATABASE ' , 'unittest ' ),
2729 'username ' => env ('MYSQL_USERNAME ' , 'root ' ),
2830 'password ' => env ('MYSQL_PASSWORD ' , '' ),
You can’t perform that action at this time.
0 commit comments