-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
ci: migrate from CircleCI to GitHub Actions #605
ci: migrate from CircleCI to GitHub Actions #605
Conversation
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 do like the idea of having everything in GitHub Actions and remove CircleCI from the list of tools we use and it's a great PR to replace tests on commits and PRs! 👍🏻
@dhui Thoughts?
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.
Thanks for the PR and helping us improve our release process @Juneezee !
I do like the idea of having everything in GitHub Actions and remove CircleCI from the list of tools we use and it's a great PR to replace tests on commits and PRs! 👍🏻
@dhui Thoughts?
Agreed, we should move our tests to use GitHub Actions as well.
Let's keep the other CI and docker files for now in case we need to continue using them. We can clean them up later.
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.
Add workflow_run
to the GoReleaser workflow/job (.github/workflows/release.yaml
) so that it only runs after tests pass
@dhui There is a caveat if we use If the EDIT: This leaves us to only 2 choices now (hoping that GitHub could improve the workflow dependencies in the future)
|
On the other hand, this could be solved if we merge the two workflows into one, and use the following code by @Juneezee to check if the release should run or not goreleaser:
name: Release a new version
environment: GoReleaser
runs-on: ubuntu-latest
+ needs: [lint, test]
+ if: ${{ success() && github.repository == 'golang-migrate/migrate' && contains(github.ref, 'refs/tags/v') }}
... So I'm happy to turn my vote on the question of "should we merge the two workflows or not". |
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.
Looks legit to me! @dhui you concur?
.github/workflows/ci.yaml
Outdated
test-finish: | ||
needs: [test] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: shogo82148/actions-goveralls@v1 | ||
with: |
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 missed these lines in the previous commit. They are required for coveralls to work correctly with parallel tests, see https://github.com/shogo82148/actions-goveralls#parallel-job-example
Last round of review I think, everything seems to be well configured 🚀 |
Signed-off-by: Eng Zer Jun <[email protected]>
At the time of this commit, it is not possible to make the `goreleaser` job run in a separate workflow and detect the tag push event, see [1]. [1]: https://stackoverflow.com/a/68078768/7902371 Signed-off-by: Eng Zer Jun <[email protected]>
@dhui Please take a look again 😃 |
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.
Thanks for migrating our tests over!
Completely migrates from CircleCI to GitHub Actions. Runs
lint
andtest
on every push and pull request.