@@ -15,17 +15,24 @@ jobs:
1515 name : Test
1616 runs-on : macos-latest
1717 strategy :
18+ fail-fast : false
1819 matrix :
19- mysql : ["8.0", "8.4"]
20+ mysql : ["8.0", "8.4", "9.6" ]
2021 steps :
2122 - uses : actions/checkout@v6
2223 - name : Setup MySQL
2324 run : |
2425 brew install mysql@${{ matrix.mysql }}
26+ # Apply macOS-specific config if it exists (e.g., 8.4 needs mysql_native_password=ON)
27+ # Homebrew MySQL reads config from $(brew --prefix)/etc/my.cnf
28+ if [[ -f "test/mysql/conf.d/${{ matrix.mysql }}/macos.cnf" ]]; then
29+ cat test/mysql/conf.d/${{ matrix.mysql }}/macos.cnf >> $(brew --prefix)/etc/my.cnf
30+ fi
2531 (unset CI; brew postinstall mysql@${{ matrix.mysql }})
2632 brew services start mysql@${{ matrix.mysql }}
2733 sleep 5
2834 $(brew --prefix mysql@${{ matrix.mysql }})/bin/mysql -uroot -e 'CREATE DATABASE test'
35+ $(brew --prefix mysql@${{ matrix.mysql }})/bin/mysql -uroot < test/mysql/docker-entrypoint-initdb.d/caching_sha2_password_user.sql
2936 - name : Build
3037 run : CFLAGS="-I$(brew --prefix openssl@1.1)/include" LDFLAGS="-L$(brew --prefix openssl@1.1)/lib" make all test/test
3138 - name : test
3441 name : Test Ruby
3542 runs-on : macos-latest
3643 strategy :
44+ fail-fast : false
3745 matrix :
38- mysql : ["8.0"]
46+ mysql : ["8.0", "8.4", "9.6" ]
3947 ruby : ["3.0", "3.1", "3.2", "3.3", "3.4", "4.0"]
4048 steps :
4149 - uses : actions/checkout@v6
@@ -47,12 +55,20 @@ jobs:
4755 MYSQL_VERSION : ${{ matrix.mysql }}
4856 run : |
4957 brew install mysql@${{ matrix.mysql }}
58+ # Apply macOS-specific config if it exists (e.g., 8.4 needs mysql_native_password=ON)
59+ # Homebrew MySQL reads config from $(brew --prefix)/etc/my.cnf
60+ if [[ -f "test/mysql/conf.d/${{ matrix.mysql }}/macos.cnf" ]]; then
61+ cat test/mysql/conf.d/${{ matrix.mysql }}/macos.cnf >> $(brew --prefix)/etc/my.cnf
62+ fi
5063 (unset CI; brew postinstall mysql@${{ matrix.mysql }})
5164 brew services start mysql@${{ matrix.mysql }}
5265 sleep 5
5366 $(brew --prefix mysql@${{ matrix.mysql }})/bin/mysql -uroot -e 'CREATE DATABASE test'
54- [[ "$MYSQL_VERSION" == "8.0" ]] && $(brew --prefix mysql@${{ matrix.mysql }})/bin/mysql -uroot < test/mysql/docker-entrypoint-initdb.d/caching_sha2_password_user.sql
55- $(brew --prefix mysql@${{ matrix.mysql }})/bin/mysql -uroot < test/mysql/docker-entrypoint-initdb.d/native_password_user.sql
67+ $(brew --prefix mysql@${{ matrix.mysql }})/bin/mysql -uroot < test/mysql/docker-entrypoint-initdb.d/caching_sha2_password_user.sql
68+ # mysql_native_password plugin was removed in MySQL 9.x
69+ if [[ ! "${{ matrix.mysql }}" =~ ^9 ]]; then
70+ $(brew --prefix mysql@${{ matrix.mysql }})/bin/mysql -uroot -e "CREATE USER 'native'@'%'; GRANT ALL PRIVILEGES ON test.* TO 'native'@'%'; ALTER USER 'native'@'%' IDENTIFIED WITH mysql_native_password BY 'password';"
71+ fi
5672 $(brew --prefix mysql@${{ matrix.mysql }})/bin/mysql -uroot < test/mysql/docker-entrypoint-initdb.d/x509_user.sql
5773 $(brew --prefix mysql@${{ matrix.mysql }})/bin/mysql -uroot < test/mysql/docker-entrypoint-initdb.d/cleartext_user.sql
5874 - name : Install dependencies
0 commit comments