2024-01-29 14:53:15 +08:00
|
|
|
name: test mysql8
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
name: test mysql8
|
|
|
|
runs-on: ubuntu-latest
|
2024-01-29 15:05:53 +08:00
|
|
|
steps:
|
|
|
|
- run: apt-get update && apt-get install -y lsb-release inetutils-tools
|
|
|
|
- run: wget https://dev.mysql.com/get/mysql-apt-config_0.8.24-1_all.deb
|
|
|
|
- run: DEBIAN_FRONTEND=noninteractive dpkg -i mysql-apt-config_0.8.24-1_all.deb
|
2024-01-29 15:08:25 +08:00
|
|
|
- run: apt-key adv --keyserver keyserver.ubuntu.com --recv-keys B7B3B788A8D3785C
|
2024-01-29 15:05:53 +08:00
|
|
|
- run: apt-get update
|
2024-01-29 15:10:24 +08:00
|
|
|
- run: apt install -y default-mysql-client
|
2024-01-29 14:53:15 +08:00
|
|
|
- run: mysql -h mysql8 -u root -e '\q'
|
|
|
|
|
|
|
|
services:
|
|
|
|
mysql8:
|
|
|
|
image: mysql:8.0
|
|
|
|
env:
|
|
|
|
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
|
|
|
MYSQL_DATABASE: test_db
|
|
|
|
ports:
|
|
|
|
- 3306:3306
|