@@ -13,32 +13,32 @@ jobs:
1313 image : mysql:9
1414 env :
1515 MYSQL_ROOT_PASSWORD : password
16- ports :
17- - 3306:3306
16+ expose :
17+ - 3306
1818 options : --health-cmd "mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 10
1919 postgres :
2020 image : postgres:17
2121 env :
2222 POSTGRES_USER : postgres
2323 POSTGRES_PASSWORD : password
24- ports :
25- - 5432:5432
24+ expose :
25+ - 5432
2626 options : --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
2727 mongodb :
2828 image : mongo
2929 env :
3030 MONGO_INITDB_ROOT_USERNAME : root
3131 MONGO_INITDB_ROOT_PASSWORD : password
32- ports :
33- - 27017:27017
32+ expose :
33+ - 27017
3434 memcached :
3535 image : memcached
36- ports :
37- - 11211:11211
36+ expose :
37+ - 11211
3838 redis :
3939 image : redis
40- ports :
41- - 6379:6379
40+ expose :
41+ - 6379
4242 options : --entrypoint redis-server
4343
4444 strategy :
@@ -65,21 +65,25 @@ jobs:
6565 run : |
6666 cp composer.$(echo ${{ matrix.mapper }} ).json composer.json
6767
68- - name : Install Mysql Client
69- run : apt-get update && apt-get install mysql-client
68+ - name : Install DB Client
69+ run : apt-get update && apt-get install mysql-client postgresql-client-16 -y
7070
7171 - name : Install dependencies
7272 run : composer install
7373
7474 - name : Load Mysql database
7575 run : |
76- mysql -uroot -h0.0.0.0 -ppassword < vendor/linna/db-dumps/src/linna_db_mysql_test.sql
77- mysql -uroot -h0.0.0.0 -ppassword -e "SELECT user_id,name from linna_db.user"
76+ mysql -uroot -hmysql -ppassword < vendor/linna/db-dumps/src/linna_db_mysql_test.sql
77+ mysql -uroot -hmysql -ppassword -e "SELECT user_id,name from linna_db.user"
7878
7979 - name : Load Postgres database
8080 run : |
81- PGPASSWORD=password psql -U postgres -h0.0.0.0 -a -f vendor/linna/db-dumps/src/linna_db_pgsql_test.sql
82- PGPASSWORD=password psql -U postgres -h0.0.0.0 -d linna_db -c "SELECT user_id, name from public.user"
81+ PGPASSWORD=password psql -U postgres -hpostgres -a -f vendor/linna/db-dumps/src/linna_db_pgsql_test.sql
82+ PGPASSWORD=password psql -U postgres -hpostgres -d linna_db -c "SELECT user_id, name from public.user"
83+
84+ - name : Override phpunit conf
85+ run : |
86+ mv phpunit.gitea.xml phpunit.xml
8387
8488 - name : Execute tests
8589 run : vendor/bin/phpunit
0 commit comments