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
Try migrating from Travis to Github Actions #647
Conversation
Maybe we need to update mimemagic to get this to work? |
Aha - yes. we need to upgrade to mimemagic |
Closer, but now this error:
|
We're stuck at the bootsnap cache read. Bootsnap was introduced here: ec7afdf#diff-441bbd2acf3b2eab84a98d917f574109eafd6c54cbce74a2379487f9f67920a2R4 |
Aha - in parallel builds, there's a race condition: Shopify/bootsnap#177 (comment) |
bootsnap cache failing when multiple parallel builds try to access it at the same time
We should try to remove yarn from each job since i just moved it to the setup action, which gets reused. |
Hmm, i can't seem to get the Yarn install step running in the re-used segment. But it seems required there:
https://github.com/publiclab/spectral-workbench/pull/647/checks?check_run_id=2805667925#step:4:1 @waridrox would you like to try making some progress on this? GitHub Actions is pretty obscure but we do seem close to getting it running. It'd be amazing to have tests up again! |
@@ -3,4 +3,4 @@ | |||
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) | |||
|
|||
require 'bundler/setup' # Set up gems listed in the Gemfile. | |||
require 'bootsnap/setup' # Speed up boot time by caching expensive operations. | |||
# require 'bootsnap/setup' # Speed up boot time by caching expensive operations. |
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.
Here i just turned off Bootsnap for now. Let's get it running in GitHub Actions and then we can re-enable it in follow-up once we figure it out. The issue seems to be accessing the tmp directory from parallel builds at the same time (for caching in bootsnap), which locks things up.
cp config/config.yml.example config/config.yml | ||
sudo systemctl start mysql | ||
mysql -uroot -proot -e "CREATE DATABASE swbench;" | ||
bundle exec rake db:schema:load db:migrate --trace |
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.
Hmm, i'm seeing: Mysql2::Error::ConnectionError: Access denied for user 'runner'@'localhost' (using password: NO)
cp config/config.yml.example config/config.yml | ||
sudo systemctl start mysql | ||
mysql -uroot -proot -e "CREATE DATABASE swbench_test;" | ||
mysql -uroot -proot -e "GRANT ALL PRIVILEGES ON *.* TO 'swbench_test'@'%';"; |
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 tried this because i got:
Mysql2::Error::ConnectionError: Access denied for user 'runner'@'localhost' (using password: NO)
but after this i got:
ERROR 1410 (42000) at line 1: You are not allowed to create a user with GRANT
OK! We're up and running and passed our models and helpers tests! Now digging in deeper on remaining tests. I see these errors; we've seen ones like these before at plots2:
Here's the query: spectral-workbench/app/controllers/sets_controller.rb Lines 20 to 24 in e03ae35
|
That error was for controllers and integration tests, while system tests failed for this:
|
Hooray!!! |
For #636
working from: https://github.com/publiclab/spectral-workbench/blob/main/.travis.yml