doc: revised myzql version #178
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Integration Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: run mysql server | |
run: | | |
docker run --name mysql_server --env MYSQL_ROOT_PASSWORD=password -p 3306:3306 -d mysql | |
- uses: actions/checkout@v3 | |
- name: install zig | |
run: | | |
ZIG_VERSION=0.12.0 | |
wget https://ziglang.org/builds/zig-linux-x86_64-$ZIG_VERSION.tar.xz | |
tar xf zig-linux-x86_64-$ZIG_VERSION.tar.xz | |
mv zig-linux-x86_64-$ZIG_VERSION $HOME/zig-build | |
- name: Run Integration Tests - MySQL | |
run: | | |
$HOME/zig-build/zig build | |
while ! wget -qO- localhost:3306; do sleep 1; docker ps -a; done | |
$HOME/zig-build/zig build integration_test --summary all | |
rm -rf zig-cache/ zig-out/ | |
- name: Auth Test | |
run: | | |
# mysql_native_password | |
docker rm -f mysql_server | |
docker run --name mysql_server --env MYSQL_ROOT_PASSWORD=password -p 3306:3306 -d mysql \ | |
--default-authentication-plugin=mysql_native_password | |
while ! wget -qO- localhost:3306; do sleep 1; docker ps -a ; done | |
$HOME/zig-build/zig build integration_test -Dtest-filter="ping" --summary all | |
rm -rf zig-cache/ zig-out/ | |
# sha2_password | |
docker rm -f mysql_server | |
docker run --name mysql_server --env MYSQL_ROOT_PASSWORD=password -p 3306:3306 -d mysql \ | |
--default-authentication-plugin=sha256_password | |
while ! wget -qO- localhost:3306; do sleep 1; docker ps -a; done | |
$HOME/zig-build/zig build integration_test -Dtest-filter="ping" --summary all | |
rm -rf zig-cache/ zig-out/ | |
- name: Run Integration Tests - MariaDB | |
run: | | |
docker rm -f mysql_server | |
docker run --name some-mariadb --env MARIADB_ROOT_PASSWORD=password -p 3306:3306 -d mariadb | |
while ! wget -qO- localhost:3306; do sleep 1; docker ps -a ; done | |
$HOME/zig-build/zig build integration_test --summary all | |
rm -rf zig-cache/ zig-out/ |