diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a999231c..a05b81c9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -32,7 +32,7 @@ env: jobs: # Run "pytest tests" for various Python versions pytest: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 timeout-minutes: 30 strategy: # Keep running even if one variation of the job fail @@ -69,21 +69,35 @@ jobs: python -m jupyterhub_traefik_proxy.install --output=./bin pip freeze - - name: Install etcd, consul + - name: Install consul + if: matrix.backend == 'consul' run: | curl -L https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip > consul.zip unzip consul.zip -d ./bin consul + + - name: Install etcd + if: matrix.backend == 'etcd' + run: | curl -L https://github.com/etcd-io/etcd/releases/download/v${ETCD_DOWNLOAD_VERSION}/etcd-v${ETCD_DOWNLOAD_VERSION}-linux-amd64.tar.gz > etcd.tar.gz tar -xzf etcd.tar.gz -C ./bin --strip-components=1 --wildcards '*/etcd*' + - name: Install redis + if: matrix.backend == 'redis' + # from https://redis.io/docs/install/install-redis/install-redis-on-linux/ + run: | + curl -fsSL https://packages.redis.io/gpg | sudo gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg + echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/redis.list + sudo apt-get -y update + sudo apt-get -y install redis + - name: Select tests run: | if [[ ! -z "${{ matrix.backend }}" ]]; then # select backend subset echo "PYTEST_ADDOPTS=-k ${{ matrix.backend }}" >> "${GITHUB_ENV}" else - # default: select everything _but_ the etcd/consul backend tests - echo "PYTEST_ADDOPTS=-k 'not etcd and not consul'" >> "${GITHUB_ENV}" + # default: select everything _but_ the KV backend tests + echo "PYTEST_ADDOPTS=-k 'not etcd and not consul and not redis'" >> "${GITHUB_ENV}" fi - name: Run tests