Skip to content
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

Merged
merged 1 commit into from
Apr 13, 2020

Conversation

mattbrictson
Copy link
Contributor

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.

@mattbrictson mattbrictson marked this pull request as draft April 11, 2020 23:43
@mattbrictson mattbrictson force-pushed the fix-mysql-ci-failures branch 2 times, most recently from f9a9e71 to e777f53 Compare April 11, 2020 23:53
@mattbrictson mattbrictson force-pushed the fix-mysql-ci-failures branch from e777f53 to cef6fd0 Compare April 11, 2020 23:58
@mattbrictson mattbrictson marked this pull request as ready for review April 12, 2020 00:04
@@ -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
Copy link
Contributor Author

@mattbrictson mattbrictson Apr 12, 2020

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",
Copy link
Contributor Author

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.

@parndt
Copy link
Collaborator

parndt commented Apr 13, 2020

Amazing thank you so much!!

@parndt parndt merged commit 59d3de5 into norman:master Apr 13, 2020
@mattbrictson mattbrictson deleted the fix-mysql-ci-failures branch April 13, 2020 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants