Skip to content
Permalink
Browse files

CI changes - update to GH workflow + Ubuntu 20.04 as base image

  • Loading branch information
3nids committed Feb 15, 2021
1 parent d305b9c commit e53a9e6b243d0a7188091befb2f256c1069ad11b
Showing with 4,095 additions and 5,292 deletions.
  1. +9 −19 .ci/{travis/travis.ctest → config.ctest}
  2. +11 −9 .ci/{travis/scripts/ctest2travis.py → ctest2ci.py}
  3. 0 .ci/{travis/scripts → }/pr_has_label.py
  4. +4 −3 .ci/{travis/linux/scripts → }/test_blocklist.txt
  5. +0 −3 .ci/{travis/linux/scripts → }/test_flaky.txt
  6. +0 −21 .ci/travis/code_layout/before_install.sh
  7. +0 −15 .ci/travis/code_layout/before_script.sh
  8. +0 −24 .ci/travis/code_layout/install.sh
  9. +0 −25 .ci/travis/code_layout/script.sh
  10. +0 −16 .ci/travis/linux/before_install.sh
  11. +0 −45 .ci/travis/linux/before_script.sh
  12. +0 −24 .ci/travis/linux/docker-variables.env
  13. +0 −18 .ci/travis/linux/install.sh
  14. +0 −80 .ci/travis/linux/script.sh
  15. +0 −2 .ci/travis/macos/after_script.sh
  16. +0 −62 .ci/travis/macos/before_install.sh
  17. +0 −2 .ci/travis/macos/before_script.sh
  18. +0 −56 .ci/travis/macos/blocklist.txt
  19. +0 −66 .ci/travis/macos/install.sh
  20. +0 −44 .ci/travis/macos/script.sh
  21. +0 −11 .ci/travis/scripts/echo_travis_var.sh
  22. +16 −15 .ci/travis/linux/docker-compose.travis.yml → .docker/docker-compose-testing.yml
  23. +13 −35 {.ci/travis/linux/scripts → .docker}/docker-qgis-build.sh
  24. +27 −35 {.ci/travis/linux/scripts → .docker}/docker-qgis-test.sh
  25. +22 −0 .docker/docker-variables.env
  26. +0 −148 .docker/qgis3-build-deps-focal.dockerfile
  27. +16 −19 .docker/qgis3-build-deps.dockerfile
  28. +223 −0 .github/workflows/run-tests.yml
  29. +0 −79 .travis.yml
  30. +19 −12 CMakeLists.txt
  31. 0 CTestConfig.cmake → cmake_templates/CTestConfig.cmake.in
  32. +4 −1 python/core/auto_generated/qgsfeaturerequest.sip.in
  33. +2 −1 python/core/auto_generated/qgsproviderregistry.sip.in
  34. +7 −0 python/core/auto_generated/qgsrenderchecker.sip.in
  35. +6 −1 python/core/auto_generated/qgsvectorlayerfeatureiterator.sip.in
  36. +1 −1 python/plugins/processing/algs/gdal/GdalUtils.py
  37. +1 −1 python/plugins/processing/algs/gdal/OgrToPostGis.py
  38. +1 −1 python/plugins/processing/algs/grass7/description/i.eb.hsebal01.txt
  39. +2 −0 python/plugins/processing/algs/qgis/FindProjection.py
  40. +33 −5 python/plugins/processing/tests/AlgorithmsTestBase.py
  41. +27 −15 python/plugins/processing/tests/GdalAlgorithmsRasterTest.py
  42. +14 −1 python/plugins/processing/tests/GdalAlgorithmsVectorTest.py
  43. +1 −0 python/plugins/processing/tests/testdata/expected/gdal/demproj6.prj
  44. +163 −163 python/plugins/processing/tests/testdata/expected/grass7/v_net_nodes.gml
  45. +52 −0 python/plugins/processing/tests/testdata/expected/grass7/v_rast_stats2.gml
  46. +108 −0 python/plugins/processing/tests/testdata/expected/grass7/v_rast_stats2.xsd
  47. +2 −2 python/plugins/processing/tests/testdata/expected/multipoint_delaunay.gfs
  48. +86 −86 python/plugins/processing/tests/testdata/expected/multipoint_delaunay.gml
  49. +33 −0 python/plugins/processing/tests/testdata/expected/tapered_buffer_multilinev2.gml
  50. +23 −0 python/plugins/processing/tests/testdata/expected/tapered_buffer_multilinev2.xsd
  51. BIN python/plugins/processing/tests/testdata/expected/xyztiles/1/0/0_mask.png
  52. BIN python/plugins/processing/tests/testdata/expected/xyztiles/2/0/1_mask.png
  53. BIN python/plugins/processing/tests/testdata/expected/xyztiles/2/1/1_mask.png
  54. BIN python/plugins/processing/tests/testdata/expected/xyztiles/3/1/2_mask.png
  55. BIN python/plugins/processing/tests/testdata/expected/xyztiles/3/1/3_mask.png
  56. BIN python/plugins/processing/tests/testdata/expected/xyztiles/3/2/2_mask.png
  57. BIN python/plugins/processing/tests/testdata/expected/xyztiles/3/2/3_mask.png
  58. +8 −4 python/plugins/processing/tests/testdata/gdal_algorithm_raster_tests.yaml
  59. +3 −1 python/plugins/processing/tests/testdata/gdal_algorithm_vector_tests.yaml
  60. +49 −32 python/plugins/processing/tests/testdata/grass7_algorithms_imagery_tests.yaml
  61. +50 −37 python/plugins/processing/tests/testdata/grass7_algorithms_raster_tests.yaml
  62. +4 −2 python/plugins/processing/tests/testdata/grass7_algorithms_vector_tests.yaml
  63. +27 −0 python/plugins/processing/tests/testdata/qgis_algorithm_tests1.yaml
  64. +28 −12 python/plugins/processing/tests/testdata/qgis_algorithm_tests3.yaml
  65. +24 −5 python/plugins/processing/tests/testdata/qgis_algorithm_tests4.yaml
  66. +157 −87 python/plugins/processing/tests/testdata/saga_algorithm_tests.yaml
  67. +106 −30 python/testing/__init__.py
  68. +3 −5 src/analysis/vector/geometry_checker/qgsgeometryduplicatecheck.cpp
  69. +1 −1 src/core/expression/qgsexpressionfunction.cpp
  70. +24 −28 src/core/geometry/qgsgeos.cpp
  71. +22 −14 src/core/qgsaggregatecalculator.cpp
  72. +8 −1 src/core/qgsfeaturerequest.h
  73. +18 −1 src/core/qgsproviderregistry.h
  74. +11 −5 src/core/qgsrenderchecker.cpp
  75. +7 −0 src/core/qgsrenderchecker.h
  76. +4 −9 src/core/qgsvectorlayerfeatureiterator.cpp
  77. +22 −5 src/core/qgsvectorlayerfeatureiterator.h
  78. +11 −3 src/gui/qgsmaptoolcapture.cpp
  79. +14 −11 src/quickgui/qgsquickutils.cpp
  80. +3 −3 src/test/qgstest.h
  81. +6 −0 tests/src/core/testqgsauthmanager.cpp
  82. +3 −0 tests/src/core/testqgscoordinatereferencesystem.cpp
  83. +13 −1 tests/src/core/testqgsexpression.cpp
  84. +44 −23 tests/src/core/testqgsgeometry.cpp
  85. +3 −3 tests/src/core/testqgsgeonodeconnection.cpp
  86. +5 −5 tests/src/core/testqgsnetworkaccessmanager.cpp
  87. +3 −1 tests/src/providers/testqgsarcgisrestutils.cpp
  88. +1 −0 tests/src/python/CMakeLists.txt
  89. +2 −2 tests/src/python/qgis_wrapped_server.py
  90. +4 −4 tests/src/python/test_authmanager_oauth2_ows.py
  91. +5 −3 tests/src/python/test_authmanager_password_postgres.py
  92. +6 −8 tests/src/python/test_authmanager_pki_ows.py
  93. +11 −109 tests/src/python/test_authmanager_pki_postgres.py
  94. +1 −1 tests/src/python/test_db_manager_gpkg.py
  95. +8 −8 tests/src/python/test_provider_mssql.py
  96. +4 −0 tests/src/python/test_provider_ogr_gpkg.py
  97. +1 −1 tests/src/python/test_provider_postgres.py
  98. +12 −0 tests/src/python/test_provider_python.py
  99. +2 −0 tests/src/python/test_provider_shapefile.py
  100. +2 −2 tests/src/python/test_provider_spatialite.py
  101. +2 −1 tests/src/python/test_provider_virtual.py
  102. +13 −10 tests/src/python/test_qgsactionmanager.py
  103. +12 −6 tests/src/python/test_qgscoordinateoperationwidget.py
  104. +4 −4 tests/src/python/test_qgsfiledownloader.py
  105. +13 −3 tests/src/python/test_qgsgeometry.py
  106. +2 −2 tests/src/python/test_qgslabellinesettings.py
  107. +3 −3 tests/src/python/test_qgsproviderconnection_postgres.py
  108. +53 −42 tests/src/python/test_qgsrelationeditwidget.py
  109. +1 −1 tests/src/python/test_qgsserver_wms_getfeatureinfo.py
  110. +2 −1 tests/src/python/test_qgsserver_wms_getmap.py
  111. +1 −1 tests/src/python/test_qgsserver_wms_getprint.py
  112. +1 −1 tests/src/python/test_qgstaskmanager.py
  113. +1 −1 tests/src/python/test_qgsvectorfilewriter.py
  114. +0 −25 tests/src/python/test_qgsvectorlayer.py
  115. +58 −0 tests/src/python/test_qgsvectorlayershapefile.py
  116. +4 −4 tests/testdata/Dockerfile-postgis
  117. +8 −0 tests/testdata/auth_system/README.md
  118. +21 −0 tests/testdata/auth_system/certs_keys_2048/127_0_0_1.crt
  119. +17 −0 tests/testdata/auth_system/certs_keys_2048/127_0_0_1.csr
  120. +27 −0 tests/testdata/auth_system/certs_keys_2048/127_0_0_1.key
  121. +21 −0 tests/testdata/auth_system/certs_keys_2048/Gerardus.crt
  122. +17 −0 tests/testdata/auth_system/certs_keys_2048/Gerardus.csr
  123. +27 −0 tests/testdata/auth_system/certs_keys_2048/Gerardus.key
  124. +48 −0 tests/testdata/auth_system/certs_keys_2048/Gerardus.pem
  125. +45 −0 tests/testdata/auth_system/certs_keys_2048/Gerardus_bundle.crt
  126. +21 −0 tests/testdata/auth_system/certs_keys_2048/docker.crt
  127. +17 −0 tests/testdata/auth_system/certs_keys_2048/docker.csr
  128. +27 −0 tests/testdata/auth_system/certs_keys_2048/docker.key
  129. +48 −0 tests/testdata/auth_system/certs_keys_2048/docker.pem
  130. +68 −0 tests/testdata/auth_system/certs_keys_2048/gen_certs.sh
  131. +21 −0 tests/testdata/auth_system/certs_keys_2048/postgres.crt
  132. +17 −0 tests/testdata/auth_system/certs_keys_2048/postgres.csr
  133. +27 −0 tests/testdata/auth_system/certs_keys_2048/postgres.key
  134. +24 −0 tests/testdata/auth_system/certs_keys_2048/qgis_ca.crt
  135. +27 −0 tests/testdata/auth_system/certs_keys_2048/qgis_ca.key
  136. +1 −0 tests/testdata/auth_system/certs_keys_2048/qgis_ca.srl
  137. BIN ...s/testdata/control_images/3d/expected_polygon3d_extrusion/github/expected_polygon3d_extrusion.png
  138. BIN ...s/testdata/control_images/annotations/expected_html_feature/travis/expected_html_feature_mask.png
  139. BIN .../control_images/qgis_server/WMS_GetMap_Dimension_All_NoValue/WMS_GetMap_Dimension_All_NoValue.png
  140. BIN ...qgis_server/WMS_GetMap_Dimension_Elevation_MixValues/WMS_GetMap_Dimension_Elevation_MixValues.png
  141. BIN ..._server/WMS_GetMap_Dimension_Elevation_MultiValues/WMS_GetMap_Dimension_Elevation_MultiValues.png
  142. BIN ..._Dimension_Elevation_RangeElevation_Value/WMS_GetMap_Dimension_Elevation_RangeElevation_Value.png
  143. BIN ...is_server/WMS_GetMap_Dimension_Elevation_RangeValue/WMS_GetMap_Dimension_Elevation_RangeValue.png
  144. BIN ...GetMap_Dimension_Elevation_RangeValue_Filter/WMS_GetMap_Dimension_Elevation_RangeValue_Filter.png
  145. BIN ..._images/qgis_server/WMS_GetMap_Dimension_Elevation_Value/WMS_GetMap_Dimension_Elevation_Value.png
  146. BIN ...r/WMS_GetMap_Dimension_RangeElevation_MixValues/WMS_GetMap_Dimension_RangeElevation_MixValues.png
  147. BIN ...S_GetMap_Dimension_RangeElevation_MultiValues/WMS_GetMap_Dimension_RangeElevation_MultiValues.png
  148. BIN ...WMS_GetMap_Dimension_RangeElevation_RangeValue/WMS_GetMap_Dimension_RangeElevation_RangeValue.png
  149. BIN ...is_server/WMS_GetMap_Dimension_RangeElevation_Value/WMS_GetMap_Dimension_RangeElevation_Value.png
  150. BIN ...estdata/control_images/qgis_server/WMS_GetMap_Highlight_Point/WMS_GetMap_Highlight_Point_mask.png
  151. BIN ...ges/qgis_server/WMS_GetMap_Mode_8bit_with_transparency/WMS_GetMap_Mode_8bit_with_transparency.png
  152. BIN ...gis_server/WMS_GetMap_Mode_8bit_with_transparency/WMS_GetMap_Mode_8bit_with_transparency_mask.png
  153. BIN tests/testdata/control_images/qgis_server/WMS_GetPrint_Highlight/v2/WMS_GetPrint_Highlight_mask.png
  154. BIN .../testdata/control_images/qgis_server/WMS_GetPrint_StyleDefault/WMS_GetPrint_StyleDefault_mask.png
  155. BIN tests/testdata/provider/bug_21227-rename-styles.gpkg
  156. +1,695 −3,519 tests/testdata/qgis_server/landingpage/test_landing_page_with_pg_index.json
  157. +1 −1 tests/testdata/qgis_server/landingpage/test_project_Project1_Title.json
  158. +1 −1 tests/testdata/qgis_server/landingpage/test_project_Project2_Title.json
  159. +1 −1 tests/testdata/qgis_server/landingpage/test_project_Project3_Title.json
  160. +1 −1 tests/testdata/qgis_server/landingpage/test_project_QGIS_Server_-_Grouped_Nested_Layer.json
  161. +1 −1 tests/testdata/qgis_server/wms_getcapabilities_without_title.txt
  162. +1 −1 tests/testdata/qgis_server/wms_getfeatureinfo_line_tolerance_20_text_xml.txt
  163. +1 −1 tests/testdata/qgis_server/wms_getfeatureinfo_polygon_tolerance_20_text_xml.txt
  164. +28 −28 tests/testdata/qgis_server_accesscontrol/results/getcapabilities_wms_dimension.txt
@@ -5,19 +5,10 @@ SET (CTEST_BINARY_DIRECTORY $ENV{CTEST_BUILD_DIR}/build)

SET (CTEST_CMAKE_COMMAND "cmake")
SET (CTEST_BUILD_COMMAND $ENV{CTEST_BUILD_COMMAND})
SET (CTEST_SITE "travis-ci.org")
IF ($ENV{TRAVIS_PULL_REQUEST} STREQUAL "false")
# No pull request
SET (CTEST_BUILD_NAME "$ENV{TRAVIS_BRANCH} ($ENV{BUILD}) ($ENV{TRAVIS_COMMIT})")
ELSE()
SET (CTEST_BUILD_NAME "PR: $ENV{TRAVIS_PULL_REQUEST} / $ENV{TRAVIS_BRANCH} ($ENV{BUILD}) ($ENV{TRAVIS_COMMIT})")
ENDIF()
SET (CTEST_SITE "github.com")
SET (CTEST_BUILD_NAME "$ENV{CTEST_BUILD_NAME}")
SET (CTEST_BUILD_CONFIGURATION "Release")
IF ($ENV{TRAVIS_CONFIG} STREQUAL "code_layout")
SET (CTEST_TEST_TIMEOUT 600) # 600 seconds, spelling test might take some time
ELSE()
SET (CTEST_TEST_TIMEOUT 60) # 60 seconds
ENDIF()
SET (CTEST_TEST_TIMEOUT 60) # 60 seconds
IF(DEFINED ENV{CTEST_PARALLEL_LEVEL})
SET(PARALLEL_LEVEL $ENV{CTEST_PARALLEL_LEVEL})
ELSE(DEFINED ENV{CTEST_PARALLEL_LEVEL})
@@ -61,10 +52,10 @@ ctest_start(Experimental)
ctest_build (BUILD "${CTEST_BINARY_DIRECTORY}" RETURN_VALUE BUILDRES NUMBER_WARNINGS NUMWARN NUMBER_ERRORS NUMERR)

# Create link to test results
# CDash on OTB requires the date to be set for the search to work and that's the timezone this requires
SET(ENV{TZ} "UTC-6")
# CDash on OTB requires the date to be set for the search to work (used to be UTC-6, seems to be UTC now)
SET(ENV{TZ} "UTC")
EXECUTE_PROCESS(COMMAND date +%Y-%m-%d OUTPUT_VARIABLE CDASH_DATE)
SET(RESULT_LINK "http://cdash.orfeo-toolbox.org/index.php?project=QGIS&filtercount=1&showfilters=1&field1=buildname/string&compare1=63&value1=$ENV{TRAVIS_COMMIT}&date=${CDASH_DATE}")
SET(RESULT_LINK "http://cdash.orfeo-toolbox.org/index.php?project=QGIS&filtercount=1&showfilters=1&field1=buildname/string&compare1=63&value1=$ENV{CTEST_BUILD_NAME}&date=${CDASH_DATE}")
EXECUTE_PROCESS(COMMAND curl --data-urlencode "url=${RESULT_LINK}" -s http://tinyurl.com/api-create.php
OUTPUT_VARIABLE SHORTURL)

@@ -73,8 +64,7 @@ IF(NOT IGNORE_BUILD_FAILURES)
IF(NOT ${BUILDRES} EQUAL 0 OR NOT ${NUMERR} EQUAL 0)
ctest_submit (RETRY_COUNT 3 RETRY_DELAY 30)
MESSAGE("")
MESSAGE(" ${Yellow}Test results submitted to${ColorReset}")
MESSAGE(" ${BoldYellow}${SHORTURL}${ColorReset}")
MESSAGE(" ${Yellow}Test results submitted to:${ColorReset} ${SHORTURL}")
MESSAGE("")
MESSAGE( FATAL_ERROR " ${Red}Build failed. Not running tests.${ColorReset}" )
MESSAGE("")
@@ -84,8 +74,7 @@ ctest_test (BUILD "${CTEST_BINARY_DIRECTORY}" PARALLEL_LEVEL ${PARALLEL_LEVEL} R
IF(NOT ${NUMWARN} EQUAL 0 OR NOT ${TESTRES} EQUAL 0)
ctest_submit (RETRY_COUNT 3 RETRY_DELAY 30)
MESSAGE("")
MESSAGE(" ${Yellow}Test results submitted to${ColorReset}")
MESSAGE(" ${BoldYellow}${SHORTURL}${ColorReset}" )
MESSAGE(" ${Yellow}Test results submitted to:${ColorReset} ${SHORTURL}" )
MESSAGE("")
SET(LEVEL "")
IF(NOT ${TESTRES} EQUAL 0)
@@ -106,4 +95,5 @@ IF(NOT ${TESTRES} EQUAL 0)
MESSAGE(" ${BoldGreen}Success${ColorReset}")
MESSAGE(" ${Green}All tests passed successfully.${ColorReset}")
MESSAGE("")
MESSAGE("")
ENDIF(NOT ${TESTRES} EQUAL 0)
@@ -3,7 +3,7 @@

"""
***************************************************************************
ctest2travis.py
ctest2ci.py
---------------------
Date : March 2017
Copyright : (C) 2017 by Matthias Kuhn
@@ -27,30 +27,28 @@
# This script parses output from ctest and injects
#
# - Colors for failing unit tests and test cases
#
# - `travis_fold` control sequences to hide uninteresting output by default
# - Group control sequences to hide uninteresting output by default

import sys
import re
import shlex
import subprocess
from termcolor import colored

fold_stack = list()


def start_fold(tag):
sys.stdout.write('travis_fold:start:{}\n'.format(tag))
sys.stdout.write('::group::{}\n'.format(tag))
fold_stack.append(tag)


def end_fold():
try:
tag = fold_stack.pop()
sys.stdout.write('travis_fold:end:{}\n'.format(tag))
sys.stdout.write('::endgroup::\n')
except IndexError:
updated_line = colored("======================", 'magenta')
updated_line += colored("ctest2travis error when processing the following line:", 'magenta')
updated_line += colored("ctest2ci error when processing the following line:", 'magenta')
updated_line += colored("----------------------", 'magenta')
updated_line += colored(updated_line, 'magenta')
updated_line += colored("----------------------", 'magenta')
@@ -63,7 +61,7 @@ def end_fold():

def start_test_fold():
global test_count
sys.stdout.write('Running tests')
sys.stdout.write('Running tests\n')
start_fold('test.{}'.format(test_count))
test_count += 1

@@ -80,7 +78,7 @@ def start_test_fold():
updated_line = '{title}\n{line}'.format(title=colored('Running tests...', 'yellow', attrs=['bold']),
line=updated_line)

elif re.match('Test project /home/travis/build/qgis/QGIS/build', updated_line):
elif re.match('Test project /home/runner/QGIS/QGIS/build', updated_line):
end_fold() # tag=build
start_test_fold()

@@ -110,6 +108,8 @@ def start_test_fold():
in_failure = True

if not in_failing_test and re.search('[0-9]+% tests passed, [0-9]+ tests failed out of', updated_line):
tests_failing = re.match(r'.* ([0-9]+) tests failed', updated_line).group(1)
updated_line += '\n::set-output name=TESTS_FAILING::{}'.format(tests_failing)
end_fold()

if re.search('100% tests passed', updated_line):
@@ -118,6 +118,8 @@ def start_test_fold():
if re.match('Submit files', updated_line):
start_fold('submit')
elif re.search('Test results submitted to', updated_line):
cdash_url = re.match(r'.*(http.*)$', updated_line).group(1)
updated_line += '\n::set-output name=CDASH_URL::{}'.format(cdash_url)
end_fold()

sys.stdout.write(updated_line)
File renamed without changes.
@@ -11,7 +11,6 @@ qgis_sip_include
qgis_sip_uptodate

# Need a local postgres installation
PyQgsAuthManagerPKIPostgresTest
PyQgsAuthManagerOgrPostgresTest
PyQgsDbManagerPostgis

@@ -24,5 +23,7 @@ qgis_layerdefinition
# MSSQL requires the MSSQL docker
PyQgsProviderConnectionMssql

# Broken - segfaults on Travis, likely due to a real issue in the server code
# PyQgsServerWMSGetPrint
# Oracle image is temporarily disabled in the Github Actions builds
PyQgsOracleProvider


@@ -7,6 +7,3 @@ qgis_ziplayertest
# Flaky, the ms odbc driver crashes a lot on the ubuntu docker image. Retest when
# the docker base image is upgraded
PyQgsMssqlProvider

# Flaky
PyQgsPostgresRasterProvider

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit e53a9e6

Please sign in to comment.