Skip to content

CI: Add tests for various MySQL versions #870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 8, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,45 @@ jobs:
go test $(go list ./... | grep -v canal)
go test $(go list ./... | grep canal)

mysqltest:
strategy:
matrix:
mysql_version:
- 8.0.37
- 8.4.0
name: Tests with MySQL ${{ matrix.mysql_version }}
runs-on: ubuntu-latest
services:
mysql:
image: mysql:${{ matrix.mysql_version }}
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- name: MySQL versions
run: |
echo -n "mysql -v: " ; mysql -V
echo -n "mysqldump -V: " ; mysqldump -V
echo -n "MySQL Server (SELECT VERSION()): " ; mysql -h 127.0.0.1 -u root -BNe 'SELECT VERSION()'
- name: Prepare for Go
run: |
sudo apt-get install -y make gcc
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.22"
- name: Run tests
run: |
# separate test to avoid RESET MASTER conflict
# TODO: Fix "dump/" and "canal/": mysqldump tries to run SHOW MASTER STATUS on v8.4.0
go test $(go list ./... | grep -v canal | grep -v dump)
# go test $(go list ./... | grep canal | grep -v dump)

golangci:
name: golangci
runs-on: ubuntu-latest
Expand Down