forked from vitessio/vitess
-
Notifications
You must be signed in to change notification settings - Fork 1
97 lines (77 loc) · 3.48 KB
/
cluster_endtoend_onlineddl_vrepl_stress_suite.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
# DO NOT MODIFY: THIS FILE IS GENERATED USING "make generate_ci_workflows"
name: Cluster (onlineddl_vrepl_stress_suite)
on: [push, pull_request]
concurrency:
group: format('{0}-{1}', ${{ github.ref }}, 'Cluster (onlineddl_vrepl_stress_suite)')
cancel-in-progress: true
jobs:
build:
name: Run endtoend tests on Cluster (onlineddl_vrepl_stress_suite)
runs-on: ubuntu-20.04
steps:
- name: Check if workflow needs to be skipped
id: skip-workflow
run: |
skip='false'
if [[ "${{github.event.pull_request}}" == "" ]] && [[ "${{github.ref}}" != "refs/heads/main" ]] && [[ ! "${{github.ref}}" =~ ^refs/heads/release-[0-9]+\.[0-9]$ ]] && [[ ! "${{github.ref}}" =~ "refs/tags/.*" ]]; then
skip='true'
fi
echo Skip ${skip}
echo "::set-output name=skip-workflow::${skip}"
- name: Set up Go
if: steps.skip-workflow.outputs.skip-workflow == 'false'
uses: actions/setup-go@v2
with:
go-version: 1.17.13
- name: Set up python
if: steps.skip-workflow.outputs.skip-workflow == 'false'
uses: actions/setup-python@v2
- name: Tune the OS
if: steps.skip-workflow.outputs.skip-workflow == 'false'
run: |
echo '1024 65535' | sudo tee -a /proc/sys/net/ipv4/ip_local_port_range
- name: Check out code
if: steps.skip-workflow.outputs.skip-workflow == 'false'
uses: actions/checkout@v2
- name: Get dependencies
if: steps.skip-workflow.outputs.skip-workflow == 'false'
run: |
# Get key to latest MySQL repo
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29
sudo apt-get update
# stop any existing running instance of mysql
sudo service mysql stop
sudo ln -s /etc/apparmor.d/usr.sbin.mysqld /etc/apparmor.d/disable/
sudo apparmor_parser -R /etc/apparmor.d/usr.sbin.mysqld
sudo systemctl stop apparmor
# Uninstall any previously installed MySQL first
sudo DEBIAN_FRONTEND="noninteractive" apt-get remove -y --purge mysql-\*
sudo apt-get -y autoremove
sudo apt-get -y autoclean
sudo deluser mysql
sudo rm -rf /var/lib/mysql
sudo rm -rf /etc/mysql
# install necessary tools
sudo apt-get install -y make unzip g++ etcd curl git wget eatmydata xz-utils libmecab2
sudo service etcd stop
# Download mysql8.0.25 (pin it)
wget -c https://downloads.mysql.com/archives/get/p/23/file/mysql-8.0.25-linux-glibc2.17-x86_64-minimal.tar.xz
# Untar the bundle. It will have all necessary deb
sudo tar xf mysql-8.0.25-linux-glibc2.17-x86_64-minimal.tar.xz -v -C /usr
echo 'mysql version: '
sudo /usr/mysql-8.0.25-linux-glibc2.17-x86_64-minimal/bin/mysql --version
# configure rest
sudo service etcd stop
go mod download
# install JUnit report formatter
go get -u github.com/vitessio/go-junit-report@HEAD
- name: Run cluster endtoend test
if: steps.skip-workflow.outputs.skip-workflow == 'false'
timeout-minutes: 45
run: |
export VT_MYSQL_ROOT="/usr/mysql-8.0.25-linux-glibc2.17-x86_64-minimal"
export PATH="/usr/mysql-8.0.25-linux-glibc2.17-x86_64-minimal/bin:$PATH"
source build.env
set -x
# run the tests however you normally do, then produce a JUnit XML file
eatmydata -- go run test.go -docker=false -follow -shard onlineddl_vrepl_stress_suite