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

Migrate from Travis CI to GitHub Actions #237

Merged
merged 13 commits into from
Oct 10, 2022
Merged

Conversation

ibabiankou
Copy link
Contributor

Not sure if it's worth caching the SonarCloud packages, given there is only POM module here. 🤔

Copy link
Member

@rickie rickie left a 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.

.github/workflows/build.yaml Outdated Show resolved Hide resolved
.github/workflows/build.yaml Outdated Show resolved Hide resolved
.github/workflows/build.yaml Outdated Show resolved Hide resolved
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
Copy link
Member

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.

Copy link
Member

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.

@rickie rickie added this to the 0.0.4 milestone Sep 28, 2022
Copy link
Member

@Stephan202 Stephan202 left a 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.)

Copy link
Member

@Stephan202 Stephan202 left a 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
Comment on lines 37 to 38
[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
Copy link
Member

Choose a reason for hiding this comment

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

👀 wrong project.

pull_request:
types: [opened, synchronize, reopened]
push:
branches: [$default-branch]
Copy link
Member

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
Comment on lines 90 to 92
<!-- 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. -->
Copy link
Member

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
Copy link
Member

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.

name: Build and verify
on:
pull_request:
types: [opened, synchronize, reopened]
Copy link
Member

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.

Copy link
Member

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.

Comment on lines 31 to 37
- name: Cache SonarCloud packages
if: ${{ matrix.sonarEnabled }}
uses: actions/[email protected]
with:
path: ~/.sonar/cache
key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar
Copy link
Member

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.)

Copy link
Member

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.

Comment on lines 49 to 51
-Dsonar.host.url=https://sonarcloud.io
-Dsonar.organization=picnic-technologies
-Dsonar.projectKey=tech.picnic:oss-parent
Copy link
Member

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 👀

Copy link
Member

Choose a reason for hiding this comment

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

Seems to work 😄

@sonarqubecloud
Copy link

sonarqubecloud bot commented Oct 7, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rickie rickie changed the title Migrate from TravisCI to GitHub Actions Migrate from Travis CI to GitHub Actions Oct 10, 2022
@rickie rickie merged commit ff97ce2 into master Oct 10, 2022
@rickie rickie deleted the rossendrijver/PSM-1584 branch October 10, 2022 06:31
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.

3 participants