-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (51 loc) · 2.16 KB
/
integrations.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
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; docker logs mysql_server; 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/