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

Switch from travis to Github actions #27

Merged
merged 3 commits into from Apr 13, 2022
Merged

Switch from travis to Github actions #27

merged 3 commits into from Apr 13, 2022

Conversation

urkle
Copy link
Member

@urkle urkle commented Dec 9, 2021

No description provided.

@urkle urkle changed the base branch from master to feat-cleanup December 9, 2021 21:24
Base automatically changed from feat-cleanup to master December 9, 2021 21:26
@urkle urkle force-pushed the feat-gh-actions branch 2 times, most recently from c0d1b5d to f872037 Compare December 10, 2021 00:19
run: bundle exec rake spec

- name: Coveralls Parallel
uses: coverallsapp/github-action@master
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The best practice I've seen recommended is to pin a specific version/SHA and use dependabot for upgrading the pinned dependency. Not sure how we want to do it here, though -- this potentially has an impact on the action we generate as well.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a relatively simple command and maintained by the coveralls devs. yeah ideally they should have an @v1 branch but alas they do not. My concern of locking it to a specific hash is if they change something for their infrastructure it'll break anyways..

Anyways.. @ashkulz re-review this branch again though as I finally got "everything" working with GH actions (including all the DB testing used by the other gems)

Next-up is adding in rails 7.0 (since they have RC1 out)

@urkle urkle force-pushed the feat-gh-actions branch 2 times, most recently from 5c65145 to 737b0a6 Compare December 10, 2021 20:34
- cleanup config to handle DB versions better
- rewrite the "create_databases/drop_databases" to utilize AR's database tasks
- update initial gem template
Comment on lines +65 to +66
name: 'Run bundle update',
run: 'bundle update',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we want to do a bundle update here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is to ensure we are using the latest versions of the packages as everything is being "cached" from the above ruby install above. (though I guess I do need to test to see if it is actually caching the lock file)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not simply disable the cache then? I don't think we depend on a lot of gems, so won't add too much overhead (especially since we're launching database instances via docker).

@ashkulz
Copy link
Collaborator

ashkulz commented Dec 13, 2021

@urkle I'll have to see how the generated github action configuration looks like, may take me a day or two as a lot going on IRL.

@urkle
Copy link
Member Author

urkle commented Dec 13, 2021

I'll have to see how the generated github action configuration looks like, may take me a day or two as a lot going on IRL.

@ashkulz thanks, yeah there is a bit there.. But all those "variants" have been tested so if you look through the history of GH actions you can see each of the variations being tested up there.

I thought about instead creating a custom GH Action that I could use to wrap up that logic (so the ones for the gems are simpler) but I just want to get this moving for now so we can get to testing AR 6+

Copy link
Collaborator

@ashkulz ashkulz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@urkle there were other failures which I'm yet to investigate (uninitialized constant TestReporter::Notify::Enableable) -- see this run.

pull_request: nil,
},
concurrency: {
group: '${{ github.head_ref }}',
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the generated YAML, it comes out quoted for some reason -- see this failing run. If you look at this PR, it works fine when unquoted -- not sure how we can force that? We might need to migrate to a text-template like approach 🤷‍♂️

end
end
end

desc 'Create database for CI run'
task :create_ci_database do
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to merge this earlier, as I'm not sure how to get a git dependency installed during CI -- this causes an error.

--health-interval 5s \\
--health-timeout 5s \\
--health-retries 5 \\
--name database mysql:5.6
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason why we're not supporting dbversions here? I think there's 5.6, 5.7 and 8.0 tags available at dockerhub.

@urkle urkle added this to In progress in Ruby 3 & Rails 6.0 support via automation Apr 13, 2022
@urkle urkle merged commit c2a1238 into master Apr 13, 2022
Ruby 3 & Rails 6.0 support automation moved this from In progress to Done Apr 13, 2022
@urkle urkle deleted the feat-gh-actions branch April 13, 2022 14:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants