Skip to content

Commit

Permalink
Update CONTRIBUTING.md to cover using the CI job for testing
Browse files Browse the repository at this point in the history
  • Loading branch information
gemmellr committed Feb 1, 2024
1 parent 564ac5e commit 1bdab8a
Showing 1 changed file with 16 additions and 3 deletions.
19 changes: 16 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
# Contributing

* The `main` branch contains examples for the latest ActiveMQ Artemis release.
* The `development` branch is used for development work, such as creating new examples and making updates requiring as-yet-unreleased changes from the upcoming Artemis release.
Contributions should target the [`development`](https://github.com/apache/activemq-artemis-examples/tree/development) branch.

Contributions should target the `development` branch.
* The [`development`](https://github.com/apache/activemq-artemis-examples/tree/development) branch is used for all development toward the next Artemis release and the related Examples, whether it be improving existing examples, creating new examples, or most especially for making any updates needed to match as-yet-unreleased changes in the upcoming Artemis version.
* The [`main`](https://github.com/apache/activemq-artemis-examples/tree/main) branch contains examples for use with the latest ActiveMQ Artemis release.

## Testing Changes

The [GitHub Actions build](https://github.com/apache/activemq-artemis-examples/actions) for the Examples repo can also be used in your fork to test out changes. In order to enable the build in your repository, go to e.g:
`https://github.com/<your-username>/activemq-artemis-examples/actions`

Use an branch name other than _main_ to prepare your changes. Pushing commits to the examples repo on a _non-main_ branch name causes the build to check out the current revision of the [Artemis main branch](https://github.com/apache/activemq-artemis/tree/main/), build Artemis, match the examples version to the Artemis main version found, and then seperately compile (to give quick feedback when there are issues in later examples) and do verification build+run of many of the examples to check things.

If your examples updates require matching changes to the Artemis build itself, the build upon commit push will likely fail because those changes aren't yet available on the Artemis main branch. You can however also trigger the examples build _manually_ by going to e.g `https://github.com/<your-username>/activemq-artemis-examples/actions/workflows/build.yml` and clicking on the Run Workflow dropdown, which will additionally let you specify an alternative repository and branch/tag to check out and build Artemis from. This allows you to specify a related branch of your own Artemis repo fork with the necessary matching changes, enabling you to test everything together and ensure things work before raising your respective pull requests.

Pushing to the examples main branch does not check out and build Artemis since the main branch is only for use with released Artemis versions, so what is specified on the branch itself is always used as-is. The same is true for any Pull Requests raised that target the examples main branch (though again, Pull Requests should target the `development` branch).

The GitHub Actions build in the Artemis repo itself takes a somewhat similar but opposing approach, where it normally checks out the examples repo development branch and runs the respective compile check (though it does not run the examples, use the examples repo build for that).

0 comments on commit 1bdab8a

Please sign in to comment.