diff --git a/.github/workflows/testcore12.yml b/.github/workflows/testcore12.yml index 175f8d4..cd1a281 100644 --- a/.github/workflows/testcore12.yml +++ b/.github/workflows/testcore12.yml @@ -1,5 +1,15 @@ name: tests core 12 +# Every "runTests.sh" call below passes "-b docker". The script prefers podman +# whenever it is present and only falls back to docker, which is the right +# default for it -- but GitHub hosted runners ship both, and since 2026-07-29 +# their podman/crun combination aborts the first container start of a job with +# "OCI runtime error: crun: unknown version specified" (exit code 126). It is +# intermittent, hits any job, and was traced to neither the runner image nor +# the TYPO3 testing image changing. Selecting docker here avoids crun entirely +# and leaves the script default and local runs untouched. Drop the flag once +# GitHub stops producing the mismatch. + on: pull_request: @@ -17,31 +27,31 @@ jobs: - name: "Prepare dependencies for TYPO3 v12" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s composerUpdate + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s composerUpdate - name: "Validate CGL" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s cgl -n + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s cgl -n - name: "Ensure tests methods do not start with \"test\"" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s checkTestMethodsPrefix + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s checkTestMethodsPrefix - name: "Ensure UTF-8 files do not contain BOM" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s checkBom + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s checkBom # - name: "Test .rst files for integrity" # run: | -# Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s checkRst +# Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s checkRst - name: "Find duplicate exception codes" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s checkExceptionCodes + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s checkExceptionCodes - name: "Run PHPStan" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s phpstan + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s phpstan testsuite: name: all tests with core v12 @@ -57,40 +67,40 @@ jobs: - name: "Prepare dependencies for TYPO3 v12" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s composerUpdate + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s composerUpdate - name: "Run PHP lint" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s lintPhp + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s lintPhp - name: "Unit" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s unit + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s unit - name: "Unit Random" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s unitRandom + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s unitRandom - name: "Functional SQLite" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s functional -d sqlite + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s functional -d sqlite - name: "Functional MariaDB 10.5 mysqli" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli - name: "Functional MariaDB 10.5 pdo_mysql" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql - name: "Functional MySQL 8.0 mysqli" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli - name: "Functional MySQL 8.0 pdo_mysql" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql - name: "Functional PostgresSQL 10" run: | - Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php-version }} -s functional -d postgres + Build/Scripts/runTests.sh -b docker -t 12 -p ${{ matrix.php-version }} -s functional -d postgres diff --git a/.github/workflows/testcore13.yml b/.github/workflows/testcore13.yml index bd93d31..909461d 100644 --- a/.github/workflows/testcore13.yml +++ b/.github/workflows/testcore13.yml @@ -1,5 +1,15 @@ name: tests core 13 +# Every "runTests.sh" call below passes "-b docker". The script prefers podman +# whenever it is present and only falls back to docker, which is the right +# default for it -- but GitHub hosted runners ship both, and since 2026-07-29 +# their podman/crun combination aborts the first container start of a job with +# "OCI runtime error: crun: unknown version specified" (exit code 126). It is +# intermittent, hits any job, and was traced to neither the runner image nor +# the TYPO3 testing image changing. Selecting docker here avoids crun entirely +# and leaves the script default and local runs untouched. Drop the flag once +# GitHub stops producing the mismatch. + on: pull_request: @@ -17,31 +27,31 @@ jobs: - name: "Prepare dependencies for TYPO3 v13" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s composerUpdate + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s composerUpdate - name: "Validate CGL" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s cgl -n + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s cgl -n - name: "Ensure tests methods do not start with \"test\"" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s checkTestMethodsPrefix + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s checkTestMethodsPrefix - name: "Ensure UTF-8 files do not contain BOM" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s checkBom + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s checkBom # - name: "Test .rst files for integrity" # run: | -# Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s checkRst +# Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s checkRst - name: "Find duplicate exception codes" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s checkExceptionCodes + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s checkExceptionCodes - name: "Run PHPStan" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s phpstan + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s phpstan testsuite: name: all tests with core v13 @@ -57,40 +67,40 @@ jobs: - name: "Prepare dependencies for TYPO3 v13" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s composerUpdate + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s composerUpdate - name: "Run PHP lint" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s lintPhp + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s lintPhp - name: "Unit" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s unit + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s unit - name: "Unit Random" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s unitRandom + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s unitRandom - name: "Functional SQLite" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d sqlite + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s functional -d sqlite - name: "Functional MariaDB 10.5 mysqli" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli - name: "Functional MariaDB 10.5 pdo_mysql" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql - name: "Functional MySQL 8.0 mysqli" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli - name: "Functional MySQL 8.0 pdo_mysql" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql - name: "Functional PostgresSQL 10" run: | - Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php-version }} -s functional -d postgres + Build/Scripts/runTests.sh -b docker -t 13 -p ${{ matrix.php-version }} -s functional -d postgres diff --git a/Build/Scripts/runTests.sh b/Build/Scripts/runTests.sh index 68cb115..b31838a 100755 --- a/Build/Scripts/runTests.sh +++ b/Build/Scripts/runTests.sh @@ -639,7 +639,13 @@ case ${TEST_SUITE} in sqlite) # create sqlite tmpfs mount typo3temp/var/tests/functional-sqlite-dbs/ to avoid permission issues mkdir -p "${ROOT_DIR}/.Build/Web/typo3temp/var/tests/functional-sqlite-dbs/" - CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_sqlite --tmpfs ${ROOT_DIR}/.Build/Web/typo3temp/var/tests/functional-sqlite-dbs/:rw,noexec,nosuid -e DEEPL_API_KEY=mock_server -e DEEPL_HOST=deepl-func-${SUFFIX} -e DEEPL_PORT=3000 -e DEEPL_SERVER_URL=deepl-func-${SUFFIX}:3000 -e DEEPL_MOCK_SERVER_PORT=3000 -e DEEPL_SCHEME=http -e DEEPL_MOCKSERVER_USED=1" + # "mode=1777" is required for docker and harmless for podman: docker runs + # the container as "--user $HOST_UID" with group 0, while the tmpfs comes + # up owned by root with mode 0755, so the test databases cannot be created + # and every test fails with "unable to open database file". Rootless podman + # passes no "--user" (it is root inside its user namespace), which is why + # this only shows with docker. + CONTAINERPARAMS="-e typo3DatabaseDriver=pdo_sqlite --tmpfs ${ROOT_DIR}/.Build/Web/typo3temp/var/tests/functional-sqlite-dbs/:rw,noexec,nosuid,mode=1777 -e DEEPL_API_KEY=mock_server -e DEEPL_HOST=deepl-func-${SUFFIX} -e DEEPL_PORT=3000 -e DEEPL_SERVER_URL=deepl-func-${SUFFIX}:3000 -e DEEPL_MOCK_SERVER_PORT=3000 -e DEEPL_SCHEME=http -e DEEPL_MOCKSERVER_USED=1" ${CONTAINER_BIN} run ${CONTAINER_COMMON_PARAMS} --name functional-${SUFFIX} ${XDEBUG_MODE} -e XDEBUG_CONFIG="${XDEBUG_CONFIG}" ${CONTAINERPARAMS} ${IMAGE_PHP} "${COMMAND[@]}" SUITE_EXIT_CODE=$? ;;