-
Notifications
You must be signed in to change notification settings - Fork 11
145 lines (118 loc) · 4.84 KB
/
mysql-migtests.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
name: "MySQL: Migration Tests"
on:
push:
branches: ['main', '*.*-dev', '*.*.*-dev']
pull_request:
branches: ['main']
jobs:
run-mysql-migration-tests:
strategy:
matrix:
version: [2024.2.0.0-b145, 2.20.8.0-b53, 2024.1.3.1-b8, 2.23.1.0-b220]
BETA_FAST_DATA_EXPORT: [0, 1]
env:
BETA_FAST_DATA_EXPORT: ${{ matrix.BETA_FAST_DATA_EXPORT }}
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
# https://github.com/actions/setup-java
with:
distribution: "temurin"
java-version: "17"
check-latest: true
- name: Cache local Maven repository
uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Install python3 and psycopg2
run: |
sudo apt install -y python3
sudo apt install -y libpq-dev
sudo apt install python3-psycopg2
- name: Run installer script to setup voyager
run: |
yes | ./installer_scripts/install-yb-voyager --install-from-local-source
env:
ON_INSTALLER_ERROR_OUTPUT_LOG: Y
DEBEZIUM_VERSION: aneesh_ff-fb-remove
DEBEZIUM_RELEASE_TAG: voyager-debezium
- name: Start MySQL
run: |
sudo /etc/init.d/mysql start
sleep 10
- name: Test MySQL connection
run: |
mysql -uroot -proot -e 'select version();'
- name: Create MySQL user
run: |
./migtests/scripts/mysql/create_mysql_user
- name: Start YugabyteDB cluster
run: |
docker run -d --name yugabytedb \
-p7000:7000 -p9000:9000 -p15433:15433 -p5433:5433 -p9042:9042 \
yugabytedb/yugabyte:${{ matrix.version }} \
bin/yugabyted start --background=false --ui=false
sleep 20
- name: Test YugabyteDB connection
run: |
psql "postgresql://yugabyte:@127.0.0.1:5433/yugabyte" -c "SELECT version();"
- name: Create YugabyteDB user
run: |
./migtests/scripts/yugabytedb/create_yb_user
- name: Enable yb-tserver-n1 name resolution
run: |
echo "127.0.0.1 yb-tserver-n1" | sudo tee -a /etc/hosts
psql "postgresql://yugabyte@yb-tserver-n1:5433/yugabyte" -c "SELECT version();"
- name: "TEST: mysql-table-list-flags-test (table-list and exclude-table-list)"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh mysql/table-list-flags-tests
- name: "TEST: mysql-table-list-file-path-test (table-list-file-path and exclude-table-list-file-path)"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh mysql/table-list-flags-tests env-file-path-flags.sh
- name: "TEST: mysql-sakila"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh mysql/sakila
- name: "TEST: mysql-datatypes"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh mysql/datatypes
- name: "TEST: mysql-constraints"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh mysql/constraints
- name: "TEST: mysql-case-indexes"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh mysql/indexes
- name: "TEST: mysql-functions"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh mysql/functions
- name: "TEST: mysql-case-sequences"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh mysql/sequences
- name: "TEST: mysql-triggers-procedures"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh mysql/triggers-procedures
- name: "TEST: mysql-case-views"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh mysql/views
- name: "TEST: mysql-partitions"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh mysql/partitions
- name: "TEST: mysql-sample-chinook"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh mysql/chinook
- name: "TEST: mysql-misc-tests"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh mysql/misc-tests
- name: "TEST: mysql-case-sensitivity-reserved-words"
if: ${{ !cancelled() }}
run: migtests/scripts/run-test.sh mysql/case-sensitivity-reserved-words
# Placeholder for now so that a basic test can run
- name: Create the live migration user
run: |
mysql -uroot -proot -e 'GRANT SELECT, RELOAD, SHOW DATABASES, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO 'ybvoyager'@'127.0.0.1';'
- name: "TEST: mysql-live-migration-test"
if: ${{ !cancelled() }}
run: migtests/scripts/live-migration-run-test.sh mysql/basic-live-test