Skip to content
Snippets Groups Projects
Commit d02b71bf authored by ale's avatar ale
Browse files

Save test artifacts

parent 8a847eb8
Branches
No related tags found
1 merge request!469Run ci-test with actual data
Pipeline #85544 failed
......@@ -31,4 +31,11 @@ test:
- xzcat /tmp/testdata.$CI_JOB_ID/noblogs/noblogs.sql.xz | mysql --user=root --password=rootpass --host=mysql noblogs
- for blog in cavallette detriti docs ; do xzcat /tmp/testdata.$CI_JOB_ID/noblogs/noblogs_${blog}.sql.xz | mysql --user=root --password=rootpass --host=mysql noblogs; done
- with-container --expose=8080 --mount=type=bind,source=docker/test-config.json,destination=/etc/noblogs/config.json --mount=type=tmpfs,destination=/opt/noblogs/www/wp-content/blogs.dir --mount=type=tmpfs,destination=/opt/noblogs/www/wp-content/cache $IMAGE_TAG ./docker/test.sh
artifacts:
paths:
- test-artifacts/screenshots/
expose_as: Screenshots
when: always
reports:
junit: test-artifacts/pytest.xml
......@@ -6,7 +6,16 @@ TESTSUITE_IMAGE="registry.git.autistici.org/noblogs/testsuite:main"
podman run -d --expose 8443 --rm --env PROXY_DOMAIN=noblogs.org --env PROXY_BACKEND_ADDR=localhost:8080 --network=host registry.git.autistici.org/pipelines/images/test/ssl-reverse-proxy:main
# Run the test suite using Podman, in the foreground.
podman run --rm --pull=always --env TARGET_URL=${TARGET_URL} --env TARGET_ADDR=${TARGET_ADDR} --network=host ${TESTSUITE_IMAGE}
# Mount a local temporary directory to hold artifacts.
mkdir -p test-artifacts
podman run --rm --pull=always \
--env TARGET_URL=${TARGET_URL} \
--env TARGET_ADDR=${TARGET_ADDR} \
--env SCREENSHOT_DIR=/artifacts/screenshots \
--network=host \
--mount type=bind,source=test-artifacts,destination=/artifacts \
${TESTSUITE_IMAGE} -- \
--junitxml=/artifacts/pytest.xml
rc=$?
# Convert into permanent error.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment