Skip to content

Commit 5ebbfae

Browse files
Use matrix build for replica test CI
1 parent 6cdf4b5 commit 5ebbfae

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

.github/workflows/replica-tests.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ jobs:
66
build:
77

88
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
version: [mysql-5.5.62,mysql-5.6.43,mysql-5.7.25,mysql-8.0.16]
912

1013
steps:
1114
- uses: actions/checkout@v2
@@ -16,4 +19,6 @@ jobs:
1619
go-version: 1.14
1720

1821
- name: migration tests
22+
env:
23+
TEST_MYSQL_VERSION: ${{ matrix.version }}
1924
run: script/cibuild-gh-ost-replica-tests

script/cibuild-gh-ost-replica-tests

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,16 @@ test_mysql_version() {
5959
find sandboxes -name "stop_all" | bash
6060
}
6161

62-
echo "Building..."
63-
. script/build
64-
# Test all versions:
65-
find gh-ost-ci-env/mysql-tarballs/ -name "*.tar.gz" | while read f ; do basename $f ".tar.gz" ; done | sort -r | while read mysql_version ; do
66-
echo "found MySQL version: $mysql_version"
67-
done
68-
find gh-ost-ci-env/mysql-tarballs/ -name "*.tar.gz" | while read f ; do basename $f ".tar.gz" ; done | sort -r | while read mysql_version ; do
69-
test_mysql_version "$mysql_version"
70-
done
62+
# TEST_MYSQL_VERSION is set by the replica-tests CI job
63+
if [ -z "$TEST_MYSQL_VERSION" ]; then
64+
# Test all versions:
65+
find gh-ost-ci-env/mysql-tarballs/ -name "*.tar.gz" | while read f ; do basename $f ".tar.gz" ; done | sort -r | while read mysql_version ; do
66+
echo "found MySQL version: $mysql_version"
67+
done
68+
find gh-ost-ci-env/mysql-tarballs/ -name "*.tar.gz" | while read f ; do basename $f ".tar.gz" ; done | sort -r | while read mysql_version ; do
69+
test_mysql_version "$mysql_version"
70+
done
71+
else
72+
echo "found MySQL version: $MYSQL_VERSION"
73+
test_mysql_version "$MYSQL_VERSION"
74+
fi

0 commit comments

Comments
 (0)