Skip to content

Commit fef83af

Browse files
Merge pull request #968 from timvaillancourt/parallel-ci-tests
Use matrix build for replica test CI
2 parents d8bd21a + 38bec2e commit fef83af

File tree

2 files changed

+19
-7
lines changed

2 files changed

+19
-7
lines changed

.github/workflows/replica-tests.yml

+5
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

+14-7
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,20 @@ main() {
7272

7373
echo "Building..."
7474
. script/build
75-
# Test all versions:
76-
find gh-ost-ci-env/mysql-tarballs/ -name "*.tar.xz" | while read f ; do basename $f ".tar.xz" ; done | sort -r | while read mysql_version ; do
77-
echo "found MySQL version: $mysql_version"
78-
done
79-
find gh-ost-ci-env/mysql-tarballs/ -name "*.tar.xz" | while read f ; do basename $f ".tar.xz" ; done | sort -r | while read mysql_version ; do
80-
test_mysql_version "$mysql_version"
81-
done
75+
76+
# TEST_MYSQL_VERSION is set by the replica-tests CI job
77+
if [ -z "$TEST_MYSQL_VERSION" ]; then
78+
# Test all versions:
79+
find gh-ost-ci-env/mysql-tarballs/ -name "*.tar.xz" | while read f ; do basename $f ".tar.xz" ; done | sort -r | while read mysql_version ; do
80+
echo "found MySQL version: $mysql_version"
81+
done
82+
find gh-ost-ci-env/mysql-tarballs/ -name "*.tar.xz" | while read f ; do basename $f ".tar.xz" ; done | sort -r | while read mysql_version ; do
83+
test_mysql_version "$mysql_version"
84+
done
85+
else
86+
echo "found MySQL version: $TEST_MYSQL_VERSION"
87+
test_mysql_version "$TEST_MYSQL_VERSION"
88+
fi
8289
}
8390

8491
main

0 commit comments

Comments
 (0)