|
@@ -125,48 +125,48 @@ jobs: |
|
|
docker commit qgis_container qgis/qgis-pr-build:PR${GITHUB_PR_NUMBER} |
|
|
docker push qgis/qgis-pr-build:PR${GITHUB_PR_NUMBER} |
|
|
|
|
|
- name: run unit tests |
|
|
- name: Run unit tests |
|
|
id: tests |
|
|
run: docker-compose -f .docker/docker-compose-testing.yml run qgis-deps /root/QGIS/.docker/docker-qgis-test.sh |
|
|
|
|
|
- name: QGIS runners |
|
|
id: runners |
|
|
run: | |
|
|
docker run -d --name qgis-testing-environment \ |
|
|
-v $(pwd):/root/QGIS \ |
|
|
-v $(pwd)/tests/src/python:/tests_directory \ |
|
|
-v $(pwd)/.docker/qgis_resources/test_runner:/usr/bin/test_runner \ |
|
|
-v $(pwd)/.docker/qgis_resources/supervisor:/etc/supervisor \ |
|
|
-e QGIS_BUILD_PATH=/root/QGIS/build/output/bin/qgis \ |
|
|
-e TEST_RUNNER_PATH=/usr/bin/test_runner/qgis_testrunner.py \ |
|
|
-e DISPLAY=:99 \ |
|
|
qgis_image \ |
|
|
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf |
|
|
# Wait for xvfb to finish starting |
|
|
printf "Waiting for the docker...🐳..." |
|
|
sleep 10 |
|
|
echo " done 🥩" |
|
|
|
|
|
declare -A testrunners |
|
|
# Passing cases: |
|
|
testrunners["test_testrunner.run_passing"]=0 |
|
|
testrunners["test_testrunner.run_skipped_and_passing"]=0 |
|
|
# Failing cases: |
|
|
testrunners["test_testrunner"]=1 |
|
|
testrunners["test_testrunner.run_all"]=1 |
|
|
testrunners["test_testrunner.run_failing"]=1 |
|
|
set +e # do not exit on error |
|
|
# Run tests in the docker |
|
|
for i in "${!testrunners[@]}" |
|
|
do |
|
|
echo "::group::docker_test_runner_${i}" |
|
|
echo "test ${i}..." |
|
|
docker exec -i qgis-testing-environment sh -c "cd /tests_directory && /usr/bin/test_runner/qgis_testrunner.sh ${i}" |
|
|
[[ $? -eq "${testrunners[$i]}" ]] && echo "success" || exit 1 |
|
|
echo "::endgroup::" |
|
|
done |
|
|
set -e # switch back |
|
|
docker stop qgis-testing-environment |
|
|
# - name: Test QGIS runners |
|
|
# id: runners |
|
|
# run: | |
|
|
# docker run -d --name qgis-testing-environment \ |
|
|
# -v $(pwd):/root/QGIS \ |
|
|
# -v $(pwd)/tests/src/python:/tests_directory \ |
|
|
# -v $(pwd)/.docker/qgis_resources/test_runner:/usr/bin/test_runner \ |
|
|
# -v $(pwd)/.docker/qgis_resources/supervisor:/etc/supervisor \ |
|
|
# -e QGIS_BUILD_PATH=/root/QGIS/build/output/bin/qgis \ |
|
|
# -e TEST_RUNNER_PATH=/usr/bin/test_runner/qgis_testrunner.py \ |
|
|
# -e DISPLAY=:99 \ |
|
|
# qgis_image \ |
|
|
# /usr/bin/supervisord -c /etc/supervisor/supervisord.conf |
|
|
# # Wait for xvfb to finish starting |
|
|
# printf "Waiting for the docker...🐳..." |
|
|
# sleep 10 |
|
|
# echo " done 🥩" |
|
|
# |
|
|
# declare -A testrunners |
|
|
# # Passing cases: |
|
|
# testrunners["test_testrunner.run_passing"]=0 |
|
|
# testrunners["test_testrunner.run_skipped_and_passing"]=0 |
|
|
# # Failing cases: |
|
|
# testrunners["test_testrunner"]=1 |
|
|
# testrunners["test_testrunner.run_all"]=1 |
|
|
# testrunners["test_testrunner.run_failing"]=1 |
|
|
# set +e # do not exit on error |
|
|
# # Run tests in the docker |
|
|
# for i in "${!testrunners[@]}" |
|
|
# do |
|
|
# echo "::group::docker_test_runner_${i}" |
|
|
# echo "test ${i}..." |
|
|
# docker exec -i qgis-testing-environment sh -c "cd /tests_directory && /usr/bin/test_runner/qgis_testrunner.sh ${i}" |
|
|
# [[ $? -eq "${testrunners[$i]}" ]] && echo "success" || exit 1 |
|
|
# echo "::endgroup::" |
|
|
# done |
|
|
# set -e # switch back |
|
|
# docker stop qgis-testing-environment |
|
|
|
|
|
|
|
|
|
|
|