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

Set up linting #4

Open
jasonaowen opened this issue Feb 24, 2023 · 4 comments
Open

Set up linting #4

jasonaowen opened this issue Feb 24, 2023 · 4 comments

Comments

@jasonaowen
Copy link
Contributor

We should set up CI to run unit tests and a linter.

Part of this is deciding on a style guide for our linter. It's been a few years, but I think the most recent CheckStyle configuration I used was on the PSM: https://github.com/SolutionGuidance/psm/blob/master/psm-app/checkstyle.xml . I think my opinions on Java style are less strongly held now than they were then, though, so maybe we should just use the Google configuration?

This Stack Overflow answer shows how to configure CheckStyle with Google checks in Gradle.

@bickelj
Copy link
Contributor

bickelj commented Feb 28, 2023

Things still needed for a CI/CD pipeline for twilio-keycloak-provider

  • Versioning binaries
  • Publishing binaries (e.g. to GHCR)
  • Reorganize the directories in twilio-keycloak-provider
  • Linting (this ticket, Set up linting #4)
  • Easier viewing of code coverage results
  • Use gradle-build-action for faster builds

At a higher level:

  • Use gradle at the top level of this repo, let each subdirectory produce a jar, create a simple build script for a theme jar (or other appropriate name) in the subdirectory for the theme.

bickelj added a commit that referenced this issue Feb 28, 2023
The result of this rearrangement:
* Gradle at the top-level (`auth`)
* A `twilio-keycloak-provider` module with its own build script.
* A `pdc-keycloak-theme` module with its own build script.
* An expected directory structure for `pdc-keycloak-theme`.

To build a submodule, `cd [module name]` and then `../gradlew [task]`.

Keycloak is Apache License 2.0 so the theme keeps that license.
The SMS Authenticator was originally Expat (MIT) so it keeps Expat.

Issue #4 Set up CI
Issue #7 Theme the user-facing Keycloak pages
@jasonaowen
Copy link
Contributor Author

That's a comprehensive list; thanks, @bickelj!

I was imagining that this issue would only be for tracking work on CI, and not on CD - that is, running tests and linting, and not versioning and publishing! In case that helps this feel less overwhelming. 😃

@bickelj
Copy link
Contributor

bickelj commented Mar 2, 2023

@jasonaowen Suppose we repurpose/rename this one to adding linting since the test run workflows (admittedly perhaps inappropriately) pushed with #3 and create the others by name as well?

@jasonaowen
Copy link
Contributor Author

Yes, I had imagined linting as being a part of this, but I should have more explicitly said so!

@bickelj bickelj changed the title Set up CI Set up linting Apr 5, 2023
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

No branches or pull requests

2 participants