Skip to content

Commit

Permalink
ci: test against redis 6 (apt install) and 7 (snap install)
Browse files Browse the repository at this point in the history
  • Loading branch information
consideRatio committed Jan 25, 2024
1 parent 13ec1fe commit 89f1678
Showing 1 changed file with 26 additions and 6 deletions.
32 changes: 26 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,24 @@ jobs:

# Test each backend that requires a python client against a modern
# version of python to ensure clients are compatible.
#
# - About redis versions:
# redis can be installed from source, as an ubuntu distribution, or
# snap package. To avoid complexity we don't build from source, but we
# test against the ubuntu and snap package, where the ubuntu package
# typically is behind the snap package.
#
# redis-test-version is provided as a matrix input only to provide
# visibility via github's web UI.
#
- python: "3.12"
backend: redis
# redis-test-version is tied to ubuntu's package, so we only test
# redis 6 currently while redis 7 is out, see
# https://packages.ubuntu.com/jammy/redis-server
install-via: apt # version 6.0.16 in ubuntu 22.04, https://packages.ubuntu.com/jammy/redis-server
redis-test-version: "6.0.16?"
- python: "3.12"
backend: redis
install-via: snap # version 7.2.4 or higher, https://snapcraft.io/redis
redis-test-version: ">=7.2.4"
- python: "3.12"
backend: etcd
etcd-test-version: "v3.4.29" # https://github.com/etcd-io/etcd/releases
Expand All @@ -72,9 +85,10 @@ jobs:
run: |
pip freeze
- name: Add ./bin to PATH
- name: Add bin directories to PATH
run: |
echo "PATH=$PWD/bin:$PATH" >> $GITHUB_ENV
echo "PATH=/snap/bin:$PATH" >> $GITHUB_ENV
- name: Install traefik
run: |
Expand Down Expand Up @@ -103,10 +117,16 @@ jobs:
etcdctl version
- name: Install redis
- name: Install redis via ${{ matrix.install-via }}
if: matrix.backend == 'redis'
run: |
sudo apt-get -y install redis-server
if [[ "${{ matrix.install-via }}" == "apt" ]]; then
sudo apt-get -y install redis-server
else
sudo snap install redis
fi
redis-server --version
- name: Run tests
run: |
Expand Down

0 comments on commit 89f1678

Please sign in to comment.