Skip to content

Implemented GHA for simonaAPI #275

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

Merged
merged 4 commits into from
Apr 15, 2025
Merged

Implemented GHA for simonaAPI #275

merged 4 commits into from
Apr 15, 2025

Conversation

PhilippSchmelter
Copy link
Contributor

Closes #247

This pull request introduces a new GitHub Actions CI pipeline and includes several supporting scripts and configuration changes. The most important changes are the addition of the CI workflow, branch name validation, semantic versioning tasks, and version checking scripts.

CI Pipeline Setup:

  • Added a new GitHub Actions workflow configuration in .github/workflows/ci.yml to automate build, test, and deployment processes. This includes steps for setting up Java and Gradle, checking branch names, running tests, building JavaDocs, and deploying to Maven Central.

Branch Name Validation:

  • Implemented a Gradle task in gradle/scripts/branchName.gradle to validate branch names against predefined patterns. This ensures branch names follow the correct format.
  • Added a shell script scripts/branch_type.sh to determine the branch type based on the branch name, setting an environment variable accordingly.

Semantic Versioning:

  • Registered Gradle tasks in gradle/scripts/semVer.gradle for obtaining the current and development versions of the project. These tasks are used to enforce semantic versioning.

Version Checking:

  • Added a script scripts/get_versions.sh to fetch the current version from the main and dev branches, storing them in environment variables.
  • Created a script scripts/run-version-check.sh to orchestrate the version checking process by calling get_versions.sh and then version_check.sh.
  • Implemented scripts/version_check.sh to compare the PR version with the main and dev branch versions, enforcing versioning rules based on the target branch.

Documentation:

  • Updated CHANGELOG.md to include the addition of the GitHub Actions pipeline.

@PhilippSchmelter PhilippSchmelter added enhancement New feature or request ci Related to continuous integration labels Apr 9, 2025
@PhilippSchmelter PhilippSchmelter self-assigned this Apr 9, 2025
@PhilippSchmelter PhilippSchmelter requested a review from Copilot April 9, 2025 12:11
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 3 out of 9 changed files in this pull request and generated 1 comment.

Files not reviewed (6)
  • gradle/scripts/branchName.gradle: Language not supported
  • gradle/scripts/semVer.gradle: Language not supported
  • scripts/branch_type.sh: Language not supported
  • scripts/get_versions.sh: Language not supported
  • scripts/run-version-check.sh: Language not supported
  • scripts/version_check.sh: Language not supported
Comments suppressed due to low confidence (1)

.github/workflows/ci.yml:50

  • The use of bash-specific double-bracket syntax may cause compatibility issues if the default shell is not bash. Consider ensuring the runner explicitly uses bash or switching to a POSIX-compliant test syntax.
if [[ "$BRANCH_NAME" == refs/heads/* ]]; then

Copy link
Member

@sebastian-peter sebastian-peter left a comment

Choose a reason for hiding this comment

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

Looks good, let's give it a try!

@sebastian-peter sebastian-peter merged commit 45c5f64 into dev Apr 15, 2025
5 checks passed
@sebastian-peter sebastian-peter deleted the ps/#247-GitHubActions branch April 15, 2025 09:00
@sebastian-peter sebastian-peter added this to the 0.8.0 milestone Apr 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci Related to continuous integration enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implementing GitHub Actions Pipeline
2 participants