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