Skip to content

Commit

Permalink
fixup mariadb in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
0xpr03 committed Aug 15, 2024
1 parent 7e936fa commit 9a34057
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,26 @@ jobs:
runs-on: ubuntu-latest
services:
mariadb:
image: mariadb:latest
image: mariadb:lts
ports:
- 3306
env:
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_DATABASE: test
MYSQL_ROOT_PASSWORD: password
options: --health-cmd="mysqladmin ping" --health-interval=5s --health-timeout=5s --health-retries=3
MYSQL_ALLOW_EMPTY_PASSWORD: yes
options: --health-cmd="healthcheck.sh --innodb_initialized" --health-interval=5s --health-timeout=5s --health-retries=5
env:
DB_DATABASE: test
DB_USER: root
DB_PASSWORD: root
steps:
- name: setup mariadb
run: |
mysql -e 'SET GLOBAL max_connections = 400;' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
mysql -e 'DROP DATABASE IF EXISTS ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
mysql --protocol tcp -e 'SET GLOBAL max_connections = 400;' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
mysql --protocol tcp -e 'DROP DATABASE IF EXISTS ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
mysql --protocol tcp -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }}
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
Expand Down

0 comments on commit 9a34057

Please sign in to comment.