-
Notifications
You must be signed in to change notification settings - Fork 3
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
Migrate from Travis CI to GitHub Actions #237
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.
Looks good! 🚀 Thanks a lot for picking this up @ibabiankou 😄.
Added a commit. Feel free to change.
Already approving as the suggestions are not blocking :).
Suggested commit message:
Migrate from Travis CI to GitHub Actions (#237)
While there, drop the now-obsolete Takari Maven plugin.
pom.xml
Outdated
<!-- We cap memory usage. This is especially relevant on Travis CI, | ||
but locally this should also be more than enough. --> | ||
-Xmx512m | ||
<!-- We cap memory usage. This is especially relevant on CI, but |
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.
This change is also based on our internal build file.
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, we use a different text in error-prone-support
, with the latter text seemingly of more recent vintage.
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.
Let's apply the same change as in PicnicSupermarket/error-prone-support#221. (I'll try to do a full review by EOD.)
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.
Added a commit. Sorry for the delay. Have meetings soon, so next round will be "later today".
README.md
Outdated
[github-actions-build-badge]: https://github.com/PicnicSupermarket/error-prone-support/actions/workflows/build.yaml/badge.svg | ||
[github-actions-build-master]: https://github.com/PicnicSupermarket/error-prone-support/actions/workflows/build.yaml?query=branch%3Amaster |
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.
👀 wrong project.
.github/workflows/build.yaml
Outdated
pull_request: | ||
types: [opened, synchronize, reopened] | ||
push: | ||
branches: [$default-branch] |
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.
We saw in PicnicSupermarket/error-prone-support#278 that unfortunately this doesn't work.
pom.xml
Outdated
<!-- Our build system (Travis CI) provides a monotonically increasing | ||
<!-- Our build system (GitHub Actions) provides a monotonically increasing | ||
build number. When building locally, this number is obviously absent. | ||
So we provide a default value. --> |
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'll sync the phrasing with error-prone-support
, but wonder: does this actually work still? (Something we can test separately; no need to block the PR over it.)
pom.xml
Outdated
<!-- We cap memory usage. This is especially relevant on Travis CI, | ||
but locally this should also be more than enough. --> | ||
-Xmx512m | ||
<!-- We cap memory usage. This is especially relevant on CI, but |
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, we use a different text in error-prone-support
, with the latter text seemingly of more recent vintage.
.github/workflows/build.yaml
Outdated
name: Build and verify | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] |
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.
There are the default, so we can omit them.
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 see I forgot to push this.
.github/workflows/build.yaml
Outdated
- name: Cache SonarCloud packages | ||
if: ${{ matrix.sonarEnabled }} | ||
uses: actions/[email protected] | ||
with: | ||
path: ~/.sonar/cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar |
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.
Nice. (In a separate PR) we might want to do something similar for Maven dependencies.
(Or are those cached by default? Below we have "Remove installed project artifacts" after all.)
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.
Ah, nevermind; I now see the cache
parameter to actions/setup-java
.
.github/workflows/build.yaml
Outdated
-Dsonar.host.url=https://sonarcloud.io | ||
-Dsonar.organization=picnic-technologies | ||
-Dsonar.projectKey=tech.picnic:oss-parent |
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.
The first two will also apply downstream; we can add them to pom.xml
. The third should be inferred; let me test that 👀
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.
Seems to work 😄
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
Not sure if it's worth caching the SonarCloud packages, given there is only POM module here. 🤔