Skip to content

Comments

Test reusable workflows#3673

Draft
a-TODO-rov wants to merge 5 commits intomainfrom
test-reusable-workflows
Draft

Test reusable workflows#3673
a-TODO-rov wants to merge 5 commits intomainfrom
test-reusable-workflows

Conversation

@a-TODO-rov
Copy link
Contributor

Make sure that:

  • You have read the contribution guidelines.
  • You have created a feature request first to discuss your contribution intent. Please reference the feature request ticket number in the pull request.
  • You applied code formatting rules using the mvn formatter:format target. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.

Peter-Sh and others added 5 commits February 18, 2026 14:10
These changes are to enable running nightly tests against Redis unstable
builds and custom builds.

The PR follows the same idea as in Jedis: redis/jedis#4425

Main changes

* Created a new reusable action `.github/actions/run-tests/action.yml`
that is intended to be run by workflows in this and external
repositories.
* Moved all the steps from `integration.yml` to the new action, with
modifications allowing the use of a custom image tag instead of a
baked-in version.

What was changed in `integration.yml`:

* Uses the run-tests action to run the tests
* Allows running tests against a custom image tag (this is indicated in
the run-name, if used)

Docker Compose

* Added the `CLIENT_LIBS_TEST_IMAGE_TAG` variable to Docker Compose.
  I'm using a separate `CLIENT_LIBS_TEST_IMAGE_TAG` variable to clearly
  separate regular versions set with REDIS_VERSION from image tags.
* Added the `CLIENT_LIBS_TEST_IMAGE` variable, it's not directly used in
  Makefile or workflows, but is supported in run-tests action. Added it for
  consitency with Jedis which originally has the ability to use different
  image url.

Changes to `Makefile`

* Added direct setting of `domainsocket` and `sentineldomainsocket` properties
  when invoking maven because `TestSettings.java` didn't respect
  REDIS_ENV_WORK_DIR value and always tried to open sockets using relative
  paths

* If `CLIENT_LIBS_TEST_IMAGE_TAG` is present, then the `version` argument
is ignored.

Changes to the workflow logic

* `CLIENT_LIBS_TEST_IMAGE_TAG`, along with `CLIENT_LIBS_TEST_IMAGE`, is
passed to `make start` if any or both are present. Then Docker Compose
gets them from the environment.

```
make start CLIENT_LIBS_TEST_IMAGE=redislabsdev/client-libs-test CLIENT_LIBS_TEST_IMAGE_TAG=custom-1235-debian-amd64
```

run-tests action allows setting a different image name using
`CLIENT_LIBS_TEST_IMAGE` (not used in `integration.yml`).

setup-maven action was updated from `1.8.0` to `1.19.0` to allow disabling
secondary checkout using `checkout-enabled` option and avoid incorrect
chekouts when using run-tests externally

Minor changes
* Docker Compose is started with `--quiet-pull` to reduce noise.
* Docker Compose is started with the `--wait` option, which is a more
correct way to wait for readiness.
* `make stop` is used instead `docker-compose stop` for consistency with
  `make start` and to enable any tear-down logic inluded in Makefile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants