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

ci: formatting, unit tests #14

Merged
merged 10 commits into from
Dec 19, 2023
Merged

ci: formatting, unit tests #14

merged 10 commits into from
Dec 19, 2023

Conversation

KaylaBrady
Copy link
Collaborator

@KaylaBrady KaylaBrady commented Dec 18, 2023

Summary

Ticket: mobile_app linting & unit test CI

What is this PR for?

This adds linting & android unit tests as part of CI. Largely copied from maple-kotlin-multiplatform with a few exceptions noted in comments.

This also adds pre-commit hooks and runs them across all files, resulting in some minor formatting changes of unrelated files.

Testing

What testing have you done?
Confirmed running as expected for this PR

@KaylaBrady KaylaBrady changed the title Kb ci ci: formatting, unit tests Dec 19, 2023
kotlinGradle { ktfmt().kotlinlangStyle() }
}

tasks.withType<org.gradle.api.tasks.testing.Test> {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

taken from this SO post about logging test output. There is a plugin linked from a different answer that does this and more, though customizing test logging seems to me like something that should be reasonably done out of the box.

Also planning to add a ticket to the backlog for reporting code coverage on the PR, potentially with JaCoCo

path: ~/.konan
key: konan-${{ runner.os }}-${{ hashFiles('build.gradle.kts') }}
restore-keys: konan-${{ runner.os }}
- run: ./gradlew spotlessCheck
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

moved spotless check up above running tests

@KaylaBrady KaylaBrady marked this pull request as ready for review December 19, 2023 18:02
@KaylaBrady KaylaBrady requested a review from a team as a code owner December 19, 2023 18:02
@KaylaBrady KaylaBrady merged commit f8e7f1e into main Dec 19, 2023
1 check passed
@KaylaBrady KaylaBrady deleted the kb-ci branch December 19, 2023 19:40
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