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 commits
andAllow rebase merging
. - tick:
Always suggest updating pull request branches
,Allow auto-merging
andAutomatically delete head branches
- un-tick:
Collaborators and teams
->Manage access
: addcode-reviews
team with theWrite
role.
Secrets
->:Actions
-> Add a new repository secret calledCOVERALLS_REPO_TOKEN
, grabbing the value from Coveralls.io.,Dependabot
-> Add the sameCOVERALLS_REPO_TOKEN
repository secret here too
- Customise the files in the new repo:
- Replace the
multi-module-template
repo name with the name of the new project. Each place is marked with aChangeMe
comment. - Replace the
example
module with the repos first module. - Replace the
creek.template.module.multi
module name with a suitable module name. Each place is marked with aChangeMe
comment. - 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
->Branches
and protect themain
branch:- Tick
Require a pull request before merging
- With
Require approvals
set 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:
build
codeQL
coverage/coveralls
- With
- Click
Create
.
- Tick
- Finish customising the repo in Coveralls.io
Settings
->Pull Request Alerts
:- Tick
Leave comments
- Set
COVERAGE THRESHOLD FOR FAILURE
to80
% - Set
COVERAGE DECREASE THRESHOLD FOR FAILURE
to1
% - Save changes.
- Tick
- Use the "Set next version" GitHub workflow to set the next version inline with other Creek repos.
./gradlew format
will format the code using Spotless../gradlew static
will run static code analysis, i.e. Spotbugs and Checkstyle../gradlew check
will run all checks and tests../gradlew coverage
will generate a cross-module Jacoco coverage report.