Template repo used to create other multi-module repos.
The template sets up the following:
- Multi-module Gradle Java project, including:
- Code formatting by Spotless
- Static code analysis by Spotbugs and Checkstyle
- Release versioning by the Axion-release-plugin
- Code coverage analysis by Jacoco
- Code coverage tracking by Coveralls.io
- Default set of test dependencies:
- GitHub build workflow, including:
- Gradle build
- Coveralls.io reporting
- Release versioning
- GitHub code owners and PR template.
- Click the "Use this template" button on the main page and follow the instructions.
- Import the new repo into Coveralls.io, noting the repo token.
- Customise the repo in GitHub
Settings->:General->Pull Requests:- un-tick:
Allow merge commitsandAllow rebase merging. - tick:
Always suggest updating pull request branches,Allow auto-mergingandAutomatically delete head branches
- un-tick:
Collaborators and teams->Manage access: addcode-reviewsteam with theWriterole.
Secrets->:Actions-> Add a new repository secret calledCOVERALLS_REPO_TOKEN, grabbing the value from Coveralls.io.,Dependabot-> Add the sameCOVERALLS_REPO_TOKENrepository secret here too
- Customise the files in the new repo:
- Replace the
multi-module-templaterepo name with the name of the new project. Each place is marked with aChangeMecomment. - Replace the
examplemodule with the repos first module. - Replace the
creek.template.module.multimodule name with a suitable module name. Each place is marked with aChangeMecomment. - Replace this README.md
- Commit changes as a PR (so you can test the PR build works!)
- Replace the
- Finish customising the repo in GitHub
Settings->Branchesand protect themainbranch:- Tick
Require a pull request before merging- With
Require approvalsset to 1.
- With
- Tick
Dismiss stale pull request approvals when new commits are pushed - Tick
Require status checks to pass before merging- With
Require branches to be up to date before merging - With status checks:
buildcodeQLcoverage/coveralls
- With
- Click
Create.
- Tick
- Finish customising the repo in Coveralls.io
Settings->Pull Request Alerts:- Tick
Leave comments - Set
COVERAGE THRESHOLD FOR FAILUREto80% - Set
COVERAGE DECREASE THRESHOLD FOR FAILUREto1% - Save changes.
- Tick
- Use the "Set next version" GitHub workflow to set the next version inline with other Creek repos.
./gradlew formatwill format the code using Spotless../gradlew staticwill run static code analysis, i.e. Spotbugs and Checkstyle../gradlew checkwill run all checks and tests../gradlew coveragewill generate a cross-module Jacoco coverage report.