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

all: add github actions workflow #3644

Merged
merged 12 commits into from
Jun 2, 2021
Merged

all: add github actions workflow #3644

merged 12 commits into from
Jun 2, 2021

Conversation

leighmcculloch
Copy link
Member

@leighmcculloch leighmcculloch commented May 28, 2021

What

Add GitHub Actions workflow that mirrors the CircleCI workflow.

Why

To simplify our CI workflows, make onboarding easier, and address some security improvements.

Known limitations

This does not include build steps relating to publishing artifacts and Horizon specific builds.

@leighmcculloch leighmcculloch changed the title all: add github actions all: add github actions workflow May 28, 2021
@leighmcculloch
Copy link
Member Author

leighmcculloch commented May 28, 2021

@bartekn No need to leave a review yet, but I wanted to let you know that it appears this works. I think the next step will be to:

  1. Add building and publishing artifacts as a last step of this workflow that only runs for tags.
  2. Add Horizon specific builds to a separate .yml workflow.

I think step (2) could happen independently of this PR and step 1, so the CircleCI file will become reduced to Horizon only specific builds after step 1.

Wdyt?

@leighmcculloch leighmcculloch removed the request for review from bartekn May 28, 2021 21:33
@leighmcculloch leighmcculloch marked this pull request as ready for review June 1, 2021 18:14
@leighmcculloch
Copy link
Member Author

Actually, I think this could be merged, and publishing artifacts could be added. Merging this doesn't need to affect existing usages, PRs would only be blocked by CircleCI builds breaking. It might help us exercise Actions a little and see if we experience any big issues, before spending more time on this. Downside of merging this is it might be confusing that we have both CircleCI and GitHub Actions running.

I've marked this PR as ready for review.

@leighmcculloch leighmcculloch requested review from bartekn and a team June 1, 2021 18:16
Copy link
Contributor

@marcelosalloum marcelosalloum left a comment

Choose a reason for hiding this comment

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

LGTM!

I just have a question: it seems like we're adding some redundancy to the CI/CD setup, are we evaluating removing some of the CircleCI tasks later if we are satisfied with GH Actions?

Copy link
Contributor

@bartekn bartekn left a comment

Choose a reason for hiding this comment

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

LGTM to merge and see how it works. We can add rest of the jobs from Circle later.

@leighmcculloch
Copy link
Member Author

I separated check, build and test, which is more like what our existing CircleCI jobs do. It reduced the total GitHub Actions runtime from 8m to 5mXs which was a nice bonus. Technically we don't have a build step in CircleCI, but I think that was an oversight. It's helpful to make sure any packages that don't happen to have tests build successfully. Ideally all packages have tests, but on the off chance we ever have a package that only contains embedded data, or constants, etc, that aren't yet depended on inside the repo it might be useful, and I think it is helpful to see build failures separate to test failure output which is often long.

@bartekn any objection to this approach?

@leighmcculloch
Copy link
Member Author

leighmcculloch commented Jun 2, 2021

are we evaluating removing some of the CircleCI tasks later if we are satisfied with GH Actions?

@marcelosalloum Yup. This is exploration, although I expect we'll migrate all checks. I think since so many teams use this repo it would be a good idea to trial it first and not remove any test runs yet.

strategy:
matrix:
os: [ubuntu-latest]
go: [1.16.4, 1.15.11]
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to prevent duplication of go/pg versions?

Copy link
Member Author

Choose a reason for hiding this comment

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

I tried removing the dupe with env vars, but failed to get it to work. Also, it was a little wonky because env vars have to be strings and these are arrays. I think it's not worth solving right now. According to the GitHub community forums they don't support yml anchors and aliases yet. If that gets added that'll probably be the ideal way to solve this.

@leighmcculloch leighmcculloch merged commit 7e0dc2a into master Jun 2, 2021
@leighmcculloch leighmcculloch deleted the githubactions branch June 3, 2021 03:30
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.

None yet

3 participants