This directory contains GitHub Actions workflows for CI/CD automation.
Continuous integration testing for all pull requests.
Trigger: Automatically on all pull requests
Purpose: Ensure code quality and compatibility across different environments
What it does:
- ✅ Builds the project with Maven (
mvn package) - ✅ Runs all unit and integration tests
- ✅ Tests on multiple platforms (Ubuntu)
- ✅ Tests with different Maven and Java versions
- ✅ Uploads test reports as artifacts (retained for 5 days)
Test Matrix:
| Component | Values |
|---|---|
| OS | Ubuntu Latest |
| Java | 17 (Eclipse Temurin) |
| Maven | Multiple versions (compatibility testing) |
| Build Tool | Maven |
Artifacts:
Test reports are uploaded and available for 5 days:
- Surefire reports (unit tests)
- Failsafe reports (integration tests)
Access them from the workflow run's "Artifacts" section.
Automatically rebase PR branches onto the target base branch via comment command.
Trigger: /rebase command in PR comments
Purpose: Keep PR branches up-to-date with the base branch without manual intervention
Comment on any pull request:
/rebase
The bot will automatically rebase your PR branch onto the target branch (usually main).
- 👀 Eyes reaction — Bot acknowledges the
/rebasecommand - 🔍 Fetch branches — Downloads the latest base branch and PR branch
- 📝 Get PR details — Retrieves branch names and commit SHAs
- ⚙️ Configure git — Sets up git identity as
github-actions[bot] - 🔀 Rebase — Executes
git rebase origin/<base_ref> - 📤 Force push — Pushes rebased branch with
--force-with-lease - ✅ Success — 🚀 reaction + success comment, OR
- ❌ Failure — 😕 reaction + manual rebase instructions
✅ Successfully rebased onto `main`
Your PR is now up-to-date! 🎉
If conflicts are detected:
What the workflow does:
- Aborts the rebase (
git rebase --abort) - Adds a 😕 reaction to your comment
- Posts detailed manual rebase instructions
Sample conflict message:
❌ Rebase failed due to merge conflicts. Please rebase manually:
git fetch origin
git rebase origin/main
# Resolve conflicts
git rebase --continue
git push --force-with-lease
How to resolve conflicts:
- Follow the instructions in the comment
- Resolve conflicts in your local repository
- Force-push the rebased branch
- The PR will update automatically
Required permissions (automatically granted):
contents: write— Push rebased branchpull-requests: write— Add reactions and comments
Fork PRs:
- Must enable "Allow edits from maintainers" when creating the PR
- Without this, the workflow cannot push to your fork
Branch PRs:
- Work automatically with no additional setup
✅ Safe by design:
- Uses GitHub's
GITHUB_TOKEN(scoped to the repository) - Only triggers on PRs (not on direct pushes)
- Respects all branch protection rules
- Uses
--force-with-leaseinstead of--force(prevents overwriting concurrent changes) - Cannot be triggered on protected branches without permission
❌ What it cannot do:
- Bypass required reviews
- Skip status checks
- Modify protected branches without approval
- Access secrets from forks (security boundary maintained)
⚠️ Works only on pull requests (not issues or commits)⚠️ Requires/rebaseon its own line (case-sensitive)⚠️ Fork PRs need "Allow edits from maintainers" enabled⚠️ Cannot resolve conflicts automatically (manual intervention required)
Automatically restart CI tests for a PR via comment command.
Trigger: /retest command in PR comments
Purpose: Restart flaky or failed tests without pushing new commits
Comment on any pull request:
/retest
The bot will find the latest Maven CI workflow run for your PR and restart it.
- 👀 Eyes reaction — Bot acknowledges the
/retestcommand - 🔍 Find workflow run — Locates the latest Maven CI run for this PR's HEAD SHA
- 🔄 Restart workflow — Triggers
gh run rerunto restart the tests - ✅ Success — 🚀 reaction + success comment with link to workflow run, OR
- ❌ Failure — 😕 reaction + explanation (no run found or restart failed)
✅ Tests restarted — check the Actions tab
Click the link to see the restarted workflow run.
- Flaky test failure — Test failed due to timing or resource issues
- Infrastructure failure — CI encountered temporary network or service issues
- Post-discussion verification — Verify tests still pass after review comments
Do NOT use if:
- You made code changes — push a commit instead to trigger fresh tests
- Tests are consistently failing — fix the issue first
No workflow run found:
❌ No workflow run found for this PR. Tests may not have run yet — push a commit to trigger them.
This happens when:
- The PR has no CI runs yet (first push hasn't triggered tests)
- All previous workflow runs were deleted
Solution: Push a commit to trigger tests.
Restart failed:
❌ Failed to restart tests. The workflow run may have already been rerun or deleted.
This happens when:
- The workflow run was already manually rerun
- The workflow run was deleted
- GitHub API rate limit exceeded (rare)
Solution: Check the Actions tab manually or wait a few minutes and try again.
Required permissions (automatically granted):
actions: write— Restart workflow runspull-requests: write— Add reactions and comments
✅ Safe by design:
- Uses GitHub's
GITHUB_TOKEN(scoped to the repository) - Only triggers on PRs (not issues or commits)
- Cannot modify code or bypass checks
- Only restarts existing workflow runs (doesn't create new ones with different code)
❌ What it cannot do:
- Run tests for code that hasn't been pushed
- Bypass required status checks
- Modify workflow files or test configuration
- Access secrets from forks (security boundary maintained)
⚠️ Works only on pull requests (not issues or commits)⚠️ Requires/reteston its own line (case-sensitive)⚠️ Only restarts the latest workflow run (not older runs)⚠️ Requires at least one previous CI run to exist
See CONTRIBUTING.md for:
- Detailed contribution guidelines
- Development workflow
- Code quality standards
- Testing requirements
- Commit message conventions
Symptom:
remote: Permission to user/repo.git denied to github-actions[bot].
Root Cause: Fork PRs require write access to the contributor's fork, which is only granted when "Allow edits from maintainers" is enabled.
Solution:
Option 1: Enable maintainer edits (recommended)
- Go to your PR on GitHub
- Click "Edit" near the PR title
- Check ✅ "Allow edits from maintainers"
- Save changes
- Comment
/rebaseagain
Option 2: Manual rebase
git fetch upstream
git rebase upstream/main
git push --force-with-leaseSymptom:
You commented /rebase but nothing happened.
Possible Causes:
- Not a pull request — The workflow only runs on PRs, not issues
- Typo in command — Must be exactly
/rebase(case-sensitive) - Workflow disabled — Check the "Actions" tab to see if workflows are enabled
- No permission to comment — You must have read access to the repository
Solution:
✅ Check your comment:
/rebase
✅ Verify it's a PR:
- Look for "Pull request" label at the top
- URL should be
/pull/123, not/issues/123
✅ Check workflow runs:
- Go to the "Actions" tab
- Filter by "Automatic Rebase"
- Check if a run was created
Symptom:
mvn test passes on your machine but fails in GitHub Actions.
Common Causes:
| Issue | Explanation | Solution |
|---|---|---|
| Environment differences | CI uses Ubuntu/Java 17, you might use macOS/Java 21 | Test locally with same Java version |
| Test isolation | Tests pass individually but fail when run together | Run full suite: mvn clean test |
| Race conditions | Timing-dependent tests fail intermittently | Review test logs, add proper synchronization |
| Resource limits | CI has memory/CPU constraints | Check for resource-heavy operations |
| Hardcoded paths | Absolute paths that work locally but not in CI | Use relative paths or System.getProperty("java.io.tmpdir") |
Debugging Steps:
-
Download test reports:
- Go to the failed workflow run
- Scroll to "Artifacts"
- Download
surefire-reports-ubuntu-latest - Extract and review failure details
-
Check logs:
Actions → Failed Run → Build and test → View logs -
Reproduce locally:
# Use same Java version as CI java -version # Should be 17 # Clean build ./mvnw clean test # Test specific profile ./mvnw test -Ppersistence-memory
-
Fix and repush:
# Fix the issue git add . git commit -m "fix: resolve CI test failure" git push
Symptom: You only changed documentation but CI runs anyway.
Solution:
Add [skip ci] or [ci skip] to your commit message:
git commit -m "docs: update contributing guide [skip ci]"Note: Use sparingly. Even documentation PRs should generally pass CI to ensure examples compile.
Symptom:
After /rebase, the PR shows duplicate commits or merge commits.
Root Cause:
You merged main into your branch instead of rebasing, then rebased afterward.
Solution:
Prevention:
- Always rebase, never merge:
git rebase origin/main - Use
/rebasecommand instead of manual merging
Recovery:
# Reset to remote state
git fetch origin
git reset --hard origin/your-branch-name
# Rebase cleanly
git rebase origin/main
# Force push
git push --force-with-lease.github/
├── CONTRIBUTING.md # Contribution guidelines
├── README.md # This file
└── workflows/
├── maven.yml # Maven CI workflow
└── rebase.yml # Automatic rebase workflow
Add to your PR description to show CI status:
Test workflow syntax:
# Install act (GitHub Actions local runner)
brew install act # macOS
# or download from https://github.com/nektos/act
# Run workflows locally
act pull_request # Runs maven.ymlNote: rebase.yml requires GitHub context and cannot be fully tested locally.
- 📖 Documentation: See ../README.md
- 🐛 Bug Reports: Open an issue
- 💬 Discussions: Use GitHub Discussions
- 🤝 Contributing: See CONTRIBUTING.md