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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with
9 additions and
2 deletions
-
.github/workflows/daily.yaml
-
.github/workflows/lint.yaml
-
test_keycloak_init.sh
-
tox.ini
|
@ -11,6 +11,9 @@ jobs: |
|
|
fail-fast: false |
|
|
fail-fast: false |
|
|
matrix: |
|
|
matrix: |
|
|
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] |
|
|
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: |
|
|
steps: |
|
|
- uses: actions/checkout@v3 |
|
|
- uses: actions/checkout@v3 |
|
|
- name: Set up Python ${{ matrix.python-version }} |
|
|
- name: Set up Python ${{ matrix.python-version }} |
|
|
|
@ -56,9 +56,12 @@ jobs: |
|
|
fail-fast: false |
|
|
fail-fast: false |
|
|
matrix: |
|
|
matrix: |
|
|
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] |
|
|
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"] |
|
|
|
|
|
keycloak-version: ["20.0", "21.0", "latest"] |
|
|
needs: |
|
|
needs: |
|
|
- check-commits |
|
|
- check-commits |
|
|
- check-linting |
|
|
- check-linting |
|
|
|
|
|
env: |
|
|
|
|
|
KEYCLOAK_DOCKER_IMAGE_TAG: ${{ matrix.keycloak-version }} |
|
|
steps: |
|
|
steps: |
|
|
- uses: actions/checkout@v3 |
|
|
- uses: actions/checkout@v3 |
|
|
- name: Set up Python ${{ matrix.python-version }} |
|
|
- name: Set up Python ${{ matrix.python-version }} |
|
|
|
@ -1,7 +1,8 @@ |
|
|
#!/usr/bin/env bash |
|
|
#!/usr/bin/env bash |
|
|
|
|
|
|
|
|
CMD_ARGS=$1 |
|
|
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() { |
|
|
function keycloak_stop() { |
|
|
if [ "$(docker ps -q -f name=unittest_keycloak)" ]; then |
|
|
if [ "$(docker ps -q -f name=unittest_keycloak)" ]; then |
|
|
|
@ -29,7 +29,7 @@ commands = |
|
|
|
|
|
|
|
|
[testenv:tests] |
|
|
[testenv:tests] |
|
|
setenv = file|tox.env |
|
|
setenv = file|tox.env |
|
|
passenv = CONTAINER_HOST |
|
|
|
|
|
|
|
|
passenv = CONTAINER_HOST KEYCLOAK_DOCKER_IMAGE_TAG |
|
|
commands = |
|
|
commands = |
|
|
./test_keycloak_init.sh "pytest -vv --cov=keycloak --cov-report term-missing {posargs}" |
|
|
./test_keycloak_init.sh "pytest -vv --cov=keycloak --cov-report term-missing {posargs}" |
|
|
|
|
|
|
|
|