Skip to content
Snippets Groups Projects
Commit c4f9ea2d authored by Roang's avatar Roang
Browse files

Update integration tests in gitlab-ci.yml

Use tox to run the integration tests.
parent 6222e4dc
No related branches found
No related tags found
No related merge requests found
...@@ -105,7 +105,6 @@ default: ...@@ -105,7 +105,6 @@ default:
} }
EOF EOF
generate_css: generate_css:
extends: extends:
- .default-rules - .default-rules
...@@ -275,7 +274,7 @@ build_test: ...@@ -275,7 +274,7 @@ build_test:
stage: container-test stage: container-test
needs: needs:
- build_test - build_test
image: python:3.11-bookworm image: $CI_REGISTRY_IMAGE/build_image:$CI_PIPELINE_ID
variables: variables:
FF_NETWORK_PER_BUILD: 1 FF_NETWORK_PER_BUILD: 1
POSTGRES_DB: image-test POSTGRES_DB: image-test
...@@ -303,33 +302,44 @@ build_test: ...@@ -303,33 +302,44 @@ build_test:
- curl --max-time 8 --retry 3 --fail ${BASE_URL}/.well-known/version - curl --max-time 8 --retry 3 --fail ${BASE_URL}/.well-known/version
- curl --max-time 3 --retry 3 --fail ${BASE_URL}/.well-known/health - curl --max-time 3 --retry 3 --fail ${BASE_URL}/.well-known/health
test_image_api: test_backoffice:
extends: .test_image extends: .test_image
variables: variables:
SERVE_API: "yes"
SERVE_BACKOFFICE: "yes" SERVE_BACKOFFICE: "yes"
BACKOFFICE_BASE_URL: /
script: script:
# check that the profile can be queried # check that the api is avilable
- curl --max-time 3 --retry 3 --fail ${BASE_URL}/api/me - curl --max-time 3 --retry 3 --fail ${BASE_URL}/
# get a list of all conferences
- curl --max-time 3 --retry 3 --fail ${BASE_URL}/api/info
# run integration tests # run integration tests
- cd tests - pdm install -d --no-editable -G dev
- python3 -m unittest -v - pdm run tox -e live-test
test_image_frontend: test_api:
extends: .test_image extends: .test_image
variables: variables:
SERVE_FRONTEND: "yes"
SERVE_API: "yes" SERVE_API: "yes"
SERVE_BACKOFFICE: "no"
API_BASE_URL: /
script:
# check that the api is avilable
- curl --max-time 3 --retry 3 --fail ${BASE_URL}/
# run integration tests
- pdm install -d --no-editable -G dev
- pdm run tox -e live-test
test_frontend:
extends: .test_image
variables:
SERVE_FRONTEND: "yes"
SERVE_API: "no"
DJANGO_LOAD_FIXTURE: "core/fixtures/anhalter.json" DJANGO_LOAD_FIXTURE: "core/fixtures/anhalter.json"
SELECTED_CONFERENCE_ID: "017c0749-a2ea-4f86-92cd-e60b4508dd98" SELECTED_CONFERENCE_ID: "017c0749-a2ea-4f86-92cd-e60b4508dd98"
script: script:
# check that something is being served at all # check that the plainui is being served
- curl --max-time 3 --retry 3 --fail ${BASE_URL}/en/index - curl --max-time 3 --retry 3 --fail ${BASE_URL}/en/index
# run integration tests # run integration tests
- cd tests - pdm install -d --no-editable -G dev
- python3 -m unittest -v - pdm run tox -e live-test
test_nginx_static: test_nginx_static:
extends: extends:
...@@ -352,8 +362,9 @@ test_nginx_static: ...@@ -352,8 +362,9 @@ test_nginx_static:
stage: publish stage: publish
needs: needs:
- build_release - build_release
- test_image_frontend - test_backoffice
- test_image_api - test_frontend
- test_api
- test_nginx_static - test_nginx_static
image: image:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment