From 1b45e3dde77728b48279405af6aac5760351872e Mon Sep 17 00:00:00 2001 From: William Desportes Date: Mon, 27 Apr 2020 02:50:18 +0200 Subject: [PATCH] ci: bind mysql on test workflow and use 127.0.0.1 as DB host Ref: b4ff7c4f7324803554a038a71c719f203cd9e24e Ref: 7ed618b3429edf62432f96e7ab8e83abf579ed2d --- .github/workflows/tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 38c3880..c270ee2 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -15,6 +15,8 @@ jobs: MYSQL_USER: sys MYSQL_PASSWORD: password options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 + ports: + - "3308:3306" steps: - name: Checkout repository uses: actions/checkout@v2 @@ -35,7 +37,7 @@ jobs: composer install --no-suggest --no-interaction --optimize-autoloader - name: Run unit tests env: - DB_HOST: mysql + DB_HOST: 127.0.0.1 DB_PORT: ${{ job.services.mysql.ports['3306'] }} DB_DATABASE: api_db DB_USERNAME: sys