File tree Expand file tree Collapse file tree 11 files changed +124
-0
lines changed Expand file tree Collapse file tree 11 files changed +124
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : MySQL 8.0 Build and Run /w docker-compose
2
+ on :
3
+ push :
4
+ branches : [ main ]
5
+ pull_request :
6
+ branches : [ main ]
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout code
12
+ uses : actions/checkout@v4
13
+
14
+ - name : Build and Run Spirit
15
+ run : docker compose -f docker/compose.yml -f docker/buildandrun.yml up --abort-on-container-exit
Original file line number Diff line number Diff line change
1
+ name : MySQL 8.0.28 (Aurora version) /w docker-compose
2
+ on :
3
+ push :
4
+ branches : [ main ]
5
+ pull_request :
6
+ branches : [ main ]
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout code
12
+ uses : actions/checkout@v4
13
+
14
+ - name : Test
15
+ run : docker compose -f docker/compose.yml -f docker/8.0.28.yml -f docker/test.yml up --abort-on-container-exit
Original file line number Diff line number Diff line change
1
+ name : MySQL 8.0.33 (RBR minimal) /w docker-compose
2
+ on :
3
+ push :
4
+ branches : [ main ]
5
+ pull_request :
6
+ branches : [ main ]
7
+ jobs :
8
+ build :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout code
12
+ uses : actions/checkout@v4
13
+
14
+ - name : Test
15
+ run : docker compose -f docker/compose.yml -f docker/8.0.33-rbr-minimal.yml -f docker/test.yml up --abort-on-container-exit
Original file line number Diff line number Diff line change
1
+ FROM golang:1.22
2
+
3
+ WORKDIR /app
4
+ COPY ../go.mod go.sum ./
5
+ RUN go mod download
6
+ COPY .. .
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env sh
2
+ set -e
3
+
4
+ go build ./cmd/spirit
5
+ ./spirit --host " mysql:3306" --database=test --table=t1
Original file line number Diff line number Diff line change
1
+ services :
2
+ mysql :
3
+ image : mysql:8.0.28
4
+ platform : linux/amd64
5
+ ports : [ '8028:3306' ]
Original file line number Diff line number Diff line change
1
+ services :
2
+ mysql :
3
+ ports : [ '8333:3306' ]
4
+ command : --binlog-row-image=MINIMAL
Original file line number Diff line number Diff line change
1
+ use mysql;
2
+ set password= ' msandbox' ;
3
+
4
+ create role if not exists R_DO_IT_ALL;
5
+ grant all on * .* to R_DO_IT_ALL;
6
+ create user if not exists msandbox@' %' identified by ' msandbox' ;
7
+
8
+ grant R_DO_IT_ALL to msandbox@' %' ;
9
+ set default role R_DO_IT_ALL to msandbox@' %' ;
10
+
11
+ create schema if not exists test;
12
+
13
+ create table if not exists test .t1
14
+ (
15
+ id int not null primary key auto_increment,
16
+ b int not null ,
17
+ c int not null
18
+ )
Original file line number Diff line number Diff line change
1
+ services :
2
+ buildandrun :
3
+ build :
4
+ context : ../.
5
+ dockerfile : Dockerfile
6
+ command : ./buildandrun.sh
7
+ depends_on :
8
+ mysql :
9
+ condition : service_healthy
Original file line number Diff line number Diff line change
1
+ services :
2
+ mysql :
3
+ image : mysql:8.0.33
4
+ ports : [ '8033:3306' ]
5
+ # to supress mbind: Operation not permitted in CI
6
+ # https://stackoverflow.com/a/55706057
7
+ cap_add :
8
+ - SYS_NICE
9
+ environment :
10
+ MYSQL_ROOT_PASSWORD : msandbox
11
+ MYSQL_USER : msandbox
12
+ MYSQL_PASSWORD : msandbox
13
+ MYSQL_DATABASE : test
14
+ healthcheck :
15
+ test : mysqladmin ping -h 127.0.0.1 -u $$MYSQL_USER --password=$$MYSQL_PASSWORD
16
+ start_period : 1s
17
+ interval : 1s
18
+ timeout : 2s
19
+ retries : 60
20
+ volumes :
21
+ - ./bootstrap.sql:/docker-entrypoint-initdb.d/bootstrap.sql
You can’t perform that action at this time.
0 commit comments