Skip to content

Commit

Permalink
CI: Add tests for various MySQL versions
Browse files Browse the repository at this point in the history
  • Loading branch information
dveeden committed May 7, 2024
1 parent 71e0a12 commit 5f5d1f3
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,43 @@ 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 Client: " ; mysql -V
echo -n "MySQL Server: " ; mysql -h 127.0.0.1 -u $MYSQL_USER -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
go test $(go list ./... | grep -v canal)
go test $(go list ./... | grep canal)
golangci:
name: golangci
runs-on: ubuntu-latest
Expand Down

0 comments on commit 5f5d1f3

Please sign in to comment.