From 4e61189d03eeb6669245a747b824ad6851284ae5 Mon Sep 17 00:00:00 2001 From: Brandon Shipley Date: Thu, 27 Mar 2025 21:21:50 -0700 Subject: [PATCH] mysql service --- .gitea/workflows/ci.yaml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 589b4c3..537c26a 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -26,15 +26,26 @@ jobs: - 5432:5432 env: POSTGRES_PASSWORD: postgres + mysql8: + image: mysql:8.0 + env: + MYSQL_ALLOW_EMPTY_PASSWORD: yes + MYSQL_DATABASE: test_db + ports: + - 3306:3306 steps: - uses: actions/checkout@v4 - - name: Setup Service if: matrix.db-type == 'mysql' run: | - sudo service mysql start - mysql -h 127.0.0.1 -u root -proot -e 'CREATE DATABASE cakephp;' + apt-get update && apt-get install -y lsb-release inetutils-tools + wget https://dev.mysql.com/get/mysql-apt-config_0.8.24-1_all.deb + DEBIAN_FRONTEND=noninteractive dpkg -i mysql-apt-config_0.8.24-1_all.deb + apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C + apt-get update + apt install -y default-mysql-client + mysql -h mysql8 -u root -e 'CREATE DATABASE cakephp;' - name: Setup PHP uses: shivammathur/setup-php@v2