Browse Source

test: Test with multiple Keycloak versions (#418)

This extends the test matrix to use multiple Keycloak versions.
pull/420/head
Tobias Genannt 2 years ago
committed by GitHub
parent
commit
1056c77a21
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      .github/workflows/daily.yaml
  2. 3
      .github/workflows/lint.yaml
  3. 3
      test_keycloak_init.sh
  4. 2
      tox.ini

3
.github/workflows/daily.yaml

@ -11,6 +11,9 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
keycloak-version: ["20.0", "21.0", "latest"]
env:
KEYCLOAK_DOCKER_IMAGE_TAG: ${{ matrix.keycloak-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}

3
.github/workflows/lint.yaml

@ -56,9 +56,12 @@ jobs:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
keycloak-version: ["20.0", "21.0", "latest"]
needs:
- check-commits
- check-linting
env:
KEYCLOAK_DOCKER_IMAGE_TAG: ${{ matrix.keycloak-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}

3
test_keycloak_init.sh

@ -1,7 +1,8 @@
#!/usr/bin/env bash
CMD_ARGS=$1
KEYCLOAK_DOCKER_IMAGE="quay.io/keycloak/keycloak:latest"
KEYCLOAK_DOCKER_IMAGE_TAG="${KEYCLOAK_DOCKER_IMAGE_TAG:-latest}"
KEYCLOAK_DOCKER_IMAGE="quay.io/keycloak/keycloak:$KEYCLOAK_DOCKER_IMAGE_TAG"
function keycloak_stop() {
if [ "$(docker ps -q -f name=unittest_keycloak)" ]; then

2
tox.ini

@ -29,7 +29,7 @@ commands =
[testenv:tests]
setenv = file|tox.env
passenv = CONTAINER_HOST
passenv = CONTAINER_HOST KEYCLOAK_DOCKER_IMAGE_TAG
commands =
./test_keycloak_init.sh "pytest -vv --cov=keycloak --cov-report term-missing {posargs}"

Loading…
Cancel
Save