Skip to content

Commit

Permalink
Use existing version comparison github action
Browse files Browse the repository at this point in the history
  • Loading branch information
barshaul committed Jun 29, 2024
1 parent a2b396a commit 971f7e8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 60 deletions.
53 changes: 0 additions & 53 deletions .github/workflows/compare-versions/action.yml

This file was deleted.

17 changes: 10 additions & 7 deletions .github/workflows/install-valkey/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,21 +62,24 @@ runs:
echo 'export PATH=/usr/local/bin:$PATH' >>~/.bash_profile
- name: Check if the current version is a Valkey release
id: is_valkey_release
uses: ./.github/workflows/compare-versions
uses: madhead/semver-utils@latest
id: version
with:
# Checks if the current tested version is a Valkey release (>= 7.2.5)
version1: ${{ inputs.engine-version }}
version2: ${{ env.VALKEY_MIN_VERSION }}
# Checks if the current tested version is a Valkey release (>= 7.2.5)
version: ${{ inputs.engine-version }}
compare-to: ${{ env.VALKEY_MIN_VERSION }}

- name: Verify Valkey installation and symlinks
shell: bash
run: |
# In Valkey releases, the engine is built with symlinks from valkey-server and valkey-cli
# to redis-server and redis-cli. This step ensures that the engine is properly installed
# with the expected version and that Valkey symlinks are correctly created.
IS_VALKEY=${{ steps.is_valkey_release.outputs.result }}
if [[ "${{ steps.version.outputs.comparison-result }}" == "<" ]]; then
IS_VALKEY=false;
else
IS_VALKEY=true;
fi
EXPECTED_VERSION=`echo ${{ inputs.engine-version }} | sed -e "s/^redis-//"`
REDIS_SERVER_VER=$(redis-server -v)
if [[ $IS_VALKEY == "true" ]]; then
Expand Down

0 comments on commit 971f7e8

Please sign in to comment.