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

Add Github action: android.yml - gradle ktlint and build #19

Merged
merged 4 commits into from
Jan 17, 2024

Conversation

maxme
Copy link
Contributor

@maxme maxme commented Jan 16, 2024

  • Run on pull requests targetting trunk
  • Run ./gradlew build
  • Run ./gradlew ktlintcheck

@maxme
Copy link
Contributor Author

maxme commented Jan 16, 2024

I will wait for #18 to be merged to update that branch

@maxme maxme requested a review from hamorillo January 16, 2024 15:56
Copy link
Contributor

@hamorillo hamorillo 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! Minor comments.

.github/workflows/android.yml Show resolved Hide resolved
.github/workflows/android.yml Outdated Show resolved Hide resolved
Comment on lines +23 to +24
- name: Grant execute permission for gradlew
run: chmod +x gradlew
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 I used this configuration in another project. You can find more info here. Maybe it could be useful to avoid manually changing permissions.

Suggested change
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Setup Gradle
uses: gradle/gradle-build-action@v2

Copy link
Contributor Author

Choose a reason for hiding this comment

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

TBH I don't know what's best. I took thIs from the official "Android CI" action (thus the name ;)).

It might be useful to use the wrapper (gradlew) directly to find if there is any issue with it (like a wrong config, or a incorrect version), gradle-build-action states they cache the gradle binary, but that's not what takes the most time.

@maxme
Copy link
Contributor Author

maxme commented Jan 17, 2024

cc @gravatar/apps-infrastructure

Copy link
Contributor

@hamorillo hamorillo left a comment

Choose a reason for hiding this comment

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

🚀 Awesome!

@maxme maxme merged commit 108eca9 into trunk Jan 17, 2024
1 check passed
@maxme maxme deleted the maxime/setup-github-actions branch January 17, 2024 08:42
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.

2 participants