-
-
Notifications
You must be signed in to change notification settings - Fork 592
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
Fix mysql jobs in CI build matrix #940
Conversation
f9a9e71
to
e777f53
Compare
e777f53
to
cef6fd0
Compare
@@ -23,7 +23,7 @@ jobs: | |||
ruby-version: ${{ matrix.ruby }} | |||
version: ${{ matrix.ruby }} | |||
- uses: actions/checkout@v1 | |||
- run: sudo apt-get update && sudo apt-get install libpq-dev postgresql-client libmysqlclient-dev libsqlite3-dev -y | |||
- run: sudo apt-get update && sudo apt-get install libpq-dev postgresql-client libmysqlclient-dev mysql-client libsqlite3-dev -y |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mysql-client
is needed because rake db:create
uses the mysql
CLI.
@@ -71,7 +71,7 @@ namespace :db do | |||
driver = FriendlyId::Test::Database.driver | |||
config = FriendlyId::Test::Database.config[driver] | |||
commands = { | |||
"mysql" => "mysql -u #{config['username']} --password=#{config['password']} -e 'create database #{config["database"]};' >/dev/null", | |||
"mysql" => "mysql -h #{config['host']} -P #{config['port']} -u #{config['username']} --password=#{config['password']} -e 'create database #{config["database"]};' >/dev/null", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to add host and port, otherwise mysql
would try (and fail) to connect to /var/lib/mysql/mysql.sock
.
Amazing thank you so much!! |
The mysql jobs are failing in CI. It seems this is because there is no mysql service running. Fix by adding a mysql service to the CI config.