diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..3324434 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +/.gitattributes export-ignore +/.github export-ignore +/.gitignore export-ignore +/tests export-ignore +/todo.txt export-ignore diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a58d27b..a243167 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,55 +7,45 @@ jobs: runs-on: ${{ matrix.operating-system }} env: SYMFONY_ENV: behat + APP_ENV: behat DB_HOST: localhost - # @todo run at least one test on pgsql. Also: make docker tests run on mysql versions 5.6, 5.7, 8.0 + # @todo run at least one test on pgsql DB_TYPE: mysql DB_ROOT_PASSWORD: root DB_EZ_USER: ezp DB_EZ_PASSWORD: ezp DB_EZ_DATABASE: behattestdb - # @todo skip setting this, always use the php version from the config file ? - # Note that PHP_VERSION has higher priority than TESTSTACK_PHP_VERSION from the config file - PHP_VERSION: ${{ matrix.php }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} strategy: fail-fast: false matrix: # @see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners for available os versions # @todo add some tests running on 'windows-latest' include: - - php: "5.6" + - config_file: '.euts.cp.env' operating-system: 'ubuntu-20.04' - config_file: 'doc/config_examples/bundle_with_extra_dependencies/.euts.cp.env' - - php: "7.0" + - config_file: '.euts.1.7.env' operating-system: 'ubuntu-20.04' - config_file: 'doc/config_examples/bundle_with_extra_dependencies/.euts.1.7.env' - - php: "7.1" + - config_file: '.euts.1.13.env' operating-system: 'ubuntu-20.04' - config_file: 'doc/config_examples/bundle_with_extra_dependencies/.euts.1.13.env' - - php: "7.2" + - config_file: '.euts.2.3.env' operating-system: 'ubuntu-22.04' - config_file: 'doc/config_examples/bundle_with_extra_dependencies/.euts.2.3.env' - - php: "7.3" + - config_file: '.euts.2.4.env' operating-system: 'ubuntu-22.04' - config_file: 'doc/config_examples/bundle_with_extra_dependencies/.euts.2.4.env' - - php: "7.4" + - config_file: '.euts.2.5.env' operating-system: 'ubuntu-22.04' - config_file: 'doc/config_examples/bundle_with_extra_dependencies/.euts.2.5.env' - - php: "7.3" + - config_file: '.euts.3.0.env' operating-system: 'ubuntu-20.04' - config_file: 'doc/config_examples/bundle_with_extra_dependencies/.euts.3.0.env' - - php: "7.3" + - config_file: '.euts.3.1.env' operating-system: 'ubuntu-20.04' - config_file: 'doc/config_examples/bundle_with_extra_dependencies/.euts.3.1.env' - - php: "7.4" + - config_file: '.euts.3.2.env' operating-system: 'ubuntu-22.04' - config_file: 'doc/config_examples/bundle_with_extra_dependencies/.euts.3.2.env' - - php: "8.0" + - config_file: '.euts.3.3.env' operating-system: 'ubuntu-22.04' - config_file: 'doc/config_examples/bundle_with_extra_dependencies/.euts.3.3.env' + steps: - name: checkout code uses: actions/checkout@v2 @@ -64,21 +54,23 @@ jobs: run: | # just in case... chmod 755 ./teststack ./bin/*.sh ./bin/setup/*.sh - # a minimal composer.json is required to allow installation of package dependencies using "dev-master", - # fix behattestdb for ez cp version, etc... - mkdir /tmp/composer_cache + # a minimal composer.json is required to allow installation of package dependencies using "dev-branchXX", + # fix behatbundle for ez cp version, hack roave/securityadvisories for unsafe dependencies, etc... cp tests/config/composer.json . + # this directory is used in the composer.json file + mkdir /tmp/composer_cache # patch the configuration file we will use: we won't have the mig bundle available - sed -i 's/Kaliop\\eZMigrationBundle\\EzMigrationBundle //' ${{ matrix.config_file }} - sed -i 's/Kaliop\\eZMigrationBundle\\eZMigrationBundle //' ${{ matrix.config_file }} + sed -i 's/Kaliop\\eZMigrationBundle\\EzMigrationBundle //' doc/config_examples/bundle_with_extra_dependencies/${{ matrix.config_file }} + sed -i 's/Kaliop\\eZMigrationBundle\\eZMigrationBundle //' doc/config_examples/bundle_with_extra_dependencies/${{ matrix.config_file }} - # 1st test: set up the app and check that the sf console works - locally + # @todo stop unused services such as webserver, php-fpm, etc... to leave more memory available for the tests + + # 1st test: set up the app and check that the sf console works - locally on the worker vm # set up the test stack locally, ie. without docker containers - # NB: the php version in use here is not the one from the .env config file, but the one set in the matrix above - name: GHA test run: | - set -a && . ${{ matrix.config_file }} && set +a + set -a && . doc/config_examples/bundle_with_extra_dependencies/${{ matrix.config_file }} && set +a ./bin/setup.sh ./bin/sfconsole.sh list env: @@ -87,10 +79,9 @@ jobs: # reset the env which we built - name: cleanup env run: | - # @todo stop other services such as webserver, to leave ore ram available for the docker tests sudo systemctl stop mysql.service - # @todo using the composer.lock file and vendors from the previous run makes install quicker, but then we - # should make sure php versions (and extensions) are in sync. + # @todo using the composer.lock file and vendors from the local run would make install quicker, but then + # we should make sure php versions (and extensions) are in sync. mv vendor vendor_nodocker # 2nd test: set up the container stack and check that the sf console works in it @@ -102,18 +93,18 @@ jobs: run: | export DB_HOST=mysql export GITHUB_ACTION= - ./teststack -e ${{ matrix.config_file }} -n -w 300 build + ./teststack -e doc/config_examples/bundle_with_extra_dependencies/${{ matrix.config_file }} -n -w 300 build - # troubleshooting failures - #- - # if: ${{ failure() }} - # run: 'DB_HOST=mysql ./teststack -e ${{ matrix.config_file }} logs ez; ./teststack -e ${{ matrix.config_file }} top' + # troubleshooting test stack build failures + #- name: troubleshooting info + # if: ${{ failure() }} + # run: 'DB_HOST=mysql ./teststack -e ${{ matrix.config_file }} logs ez; ./teststack -e ${{ matrix.config_file }} top' - name: 'docker stack: test' run: | export DB_HOST=mysql export GITHUB_ACTION= - export TESTSTACK_CONFIG_FILE=${{ matrix.config_file }} + export TESTSTACK_CONFIG_FILE=doc/config_examples/bundle_with_extra_dependencies/${{ matrix.config_file }} ./teststack logs ./teststack ps ./teststack services @@ -131,6 +122,8 @@ jobs: ./teststack cleanup ez-logs ./teststack stop ./teststack cleanup logs + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # troubleshooting failures #- name: troubleshooting info diff --git a/README.md b/README.md index a0ec0a4..11082cc 100644 --- a/README.md +++ b/README.md @@ -10,11 +10,12 @@ a specific version of the CMS and database, or on a combination of versions. Features: -* allows to run your bundle's tests on any version of eZPublish-Community, eZPlatform 1 and eZPlatform 2 +* allows to run your bundle's tests on any version of eZPublish-Community, eZPlatform 1, eZPlatform 2 and eZPlatform 3 * allows to run your bundle's tests on multiple versions of eZPlatform/eZPublish from a single source directory * allows specifying extra composer packages to be installed and symfony bundles or legacy extensions to be activated * allows to run your bundle's tests on many versions of PHP (Docker execution only) -* allows to run your bundle's tests on many versions of MySQL (Docker execution only) +* allows to run your bundle's tests on many versions of MySQL/MariaDB (Docker execution only) +* allows to run your bundle's tests on many versions of Debian/Ubuntu as underlying OS (Docker execution only) * provides a single command-line tool for managing the test stack and running tests, including maintenance operations such as database reset, logs cleanup, etc... (Docker execution only) @@ -27,7 +28,7 @@ Step 1 can be omitted when the tests are run on a server which already has php/m (only Ubuntu/Debian are supported in that case). Not (yet) supported: -- running tests on PostgreSQL instead of Mysql: this is a work in progress +- running tests on PostgreSQL instead of MySQL: this is a work in progress - running tests which require eZ to be set up with Redis or Memcached: this is a work in progress; see the FAQ later for details - running browser-based tests: this has not yet been tested @@ -35,7 +36,7 @@ Requirements ------------ * Git (for a quick way to download this tool) -* Bash shell +* Bash shell, and a smattering of command-line tools such as `which`, `find`, etc... For running tests in Docker containers: * Docker version 1.13 or later @@ -143,14 +144,7 @@ Quick Start 6. commit the `.euts.env` file into version control. Don't forget to add the `/teststack` folder to your .gitignore file to avoid accidentally committing it to your project's source code -7. Set up your tests to be run on Travis - - See an example configuration [.travis.yml](doc/config_examples/.travis.yml) file - - Note that, to perform tests on Travis, it is not necessary to run the whole tests stack - for most scenarios eZ - can be set up and the test suite execute without building and starting Docker containers. - -8. Set up your tests to be run on GitHub Actions +7. Set up your tests to be run on GitHub Actions See an example configuration [.travis.yml](doc/config_examples/github_actions.yml) file @@ -158,6 +152,14 @@ Quick Start eZ can be set up and the test suite execute without building and starting Docker containers. If on the other hand you prefer to run the tests using containers inside the workers, you are free to do that. +8. Set up your tests to be run on Travis + + See an example configuration [.travis.yml](doc/config_examples/.travis.yml) file + + Note that, to perform tests on Travis, it is not necessary to run the whole tests stack - for most scenarios eZ + can be set up and the test suite execute without building and starting Docker containers. + + Troubleshooting --------------- @@ -292,7 +294,11 @@ Q: When I run `teststack start`, there is a long wait while the script says only A: sure. Start a second shell, go to the project's folder and run `./teststack/teststack logs ez` -Q: Do you know of any bundles do make use of this one for testing, so that I can explore how they do it? +Q: Do you know of any bundles which do make use of this one for testing, so that I can explore how they do it? + +A: sure. At least the following ones: https://github.com/kaliop-uk/ezmigrationbundle, + https://github.com/kaliop-uk/ezworkfloenginebundle, https://github.com/kaliop-uk/ezloreimpsumbundle, + https://github.com/kaliop/ezobjectwrapper or https://github.com/tanoconsulting/ezmigrationbundle2 Q: When I run the tests on GitHub using Actions, I get an error `Could not authenticate against github.com ` @@ -303,9 +309,6 @@ A: in that case, change the action's yml config to pass automatically GitHub's c env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -A: sure. At least the following ones: https://github.com/kaliop/ezobjectwrapper, https://github.com/kaliop-uk/ezmigrationbundle, - https://github.com/kaliop-uk/ezworkfloenginebundle, https://github.com/kaliop-uk/ezloreimpsumbundle, - Q: Are there other projects that you know of that have similar goals as this package? A: certainly there are. Ones that I know of are f.e. https://github.com/Plopix/symfony-bundle-app-wrapper and @@ -313,6 +316,6 @@ A: certainly there are. Ones that I know of are f.e. https://github.com/Plopix/s Q: Are you testing this Test Stack itself? -A: inception!!! ;-) In fact, yes, we strive to test it, using Github Actions +A: inception!!! ;-) In fact, yes, we do to test it, using Github Actions [![Build Status](https://github.com/tanoconsulting/euts/actions/workflows/ci.yml/badge.svg)](https://github.com/tanoconsulting/euts/actions/workflows/ci.yml) diff --git a/WHATSNEW.md b/WHATSNEW.md index f3b4f8b..de1a6a3 100644 --- a/WHATSNEW.md +++ b/WHATSNEW.md @@ -15,6 +15,9 @@ Version 0.6.0 * the `teststack` command learned action `cleanup containers`; `cleanup docker-images` was renamed to `cleanup dead-images` +* fix: do not try to install php from a custom repository when the desired version is available in the apt repos already + set up in the operating system + Version 0.5.2 ============= diff --git a/bin/setup.sh b/bin/setup.sh index 4c1e435..029012b 100755 --- a/bin/setup.sh +++ b/bin/setup.sh @@ -28,6 +28,7 @@ if [ -n "${TESTSTACK_PHP_VERSION}" ]; then fi # For php 5.6, Composer needs humongous amounts of ram - which we don't have on Travis. Enable swap as workaround +# @todo we could probably disable this when EZ_COMPOSER_LOCK is used instead of EZ_PACKAGES if [ "${PHP_VERSION}" = "5.6" -a -n "${TRAVIS}" ]; then echo "Setting up a swap file..." diff --git a/doc/config_examples/bundle_with_extra_dependencies/.euts.1.13.env b/doc/config_examples/bundle_with_extra_dependencies/.euts.1.13.env index 79aad9e..f8c4c29 100644 --- a/doc/config_examples/bundle_with_extra_dependencies/.euts.1.13.env +++ b/doc/config_examples/bundle_with_extra_dependencies/.euts.1.13.env @@ -11,5 +11,5 @@ TESTSTACK_PHP_VERSION=7.1 EZ_PACKAGES='ezsystems/ezplatform:~1.13.5 ezsystems/ezplatform-xmltext-fieldtype:^1.1 ezsystems/ez-matrix-bundle:^0.2.1 netgen/tagsbundle:^2.2 ezsystems/behatbundle:^6.3' EZ_BUNDLES='Kaliop\eZMigrationBundle\EzMigrationBundle EzSystems\EzPlatformXmlTextFieldTypeBundle\EzSystemsEzPlatformXmlTextFieldTypeBundle EzSystems\MatrixBundle\EzSystemsMatrixBundle Netgen\TagsBundle\NetgenTagsBundle' -# We use specifically version 5.7 here to exercise a code-path within the test-stack +# We use specifically version 5.7 here to exercise a code-path within the teststack via its CI setup MYSQL_VERSION=5.7-debian diff --git a/doc/config_examples/bundle_with_extra_dependencies/.euts.1.7.env b/doc/config_examples/bundle_with_extra_dependencies/.euts.1.7.env index e422e77..582302e 100644 --- a/doc/config_examples/bundle_with_extra_dependencies/.euts.1.7.env +++ b/doc/config_examples/bundle_with_extra_dependencies/.euts.1.7.env @@ -4,6 +4,8 @@ COMPOSE_PROJECT_NAME=kezmbt_17 # Debian 9 Stretch comes with php 7.0 by default TESTSTACK_DEBIAN_VERSION=stretch +# We specify the php version too. This is redundant in this case and is only used for the teststack CI tests +TESTSTACK_PHP_VERSION=7.0 # Besides the eZ Kernel, our tests require NetgenTagsBundle, EzSystemsEzPlatformXmlTextFieldTypeBundle and EzSystemsMatrixBundle. EZ_PACKAGES='ezsystems/ezplatform:~1.7.9 ezsystems/ezplatform-xmltext-fieldtype:^1.1 ezsystems/ez-matrix-bundle:^0.2.1 netgen/tagsbundle:^2.2 ezsystems/behatbundle:^6.3' diff --git a/doc/config_examples/bundle_with_extra_dependencies/.euts.2.3.env b/doc/config_examples/bundle_with_extra_dependencies/.euts.2.3.env index da45460..5317210 100644 --- a/doc/config_examples/bundle_with_extra_dependencies/.euts.2.3.env +++ b/doc/config_examples/bundle_with_extra_dependencies/.euts.2.3.env @@ -2,9 +2,10 @@ # Use a specific project name - always a good idea when you plan to test the same bundle in different configurations COMPOSE_PROJECT_NAME=kezmbt_23 -# We use Debian 10 Buster which comes with php 7.3 by default, downgraded to 7.2 -TESTSTACK_DEBIAN_VERSION=buster -TETSTSTACK_PHP_VERSION=7.2 +# We use Ubuntu 18 Bionic which comes with php 7.2 by default +TESTSTACK_OS_VENDOR=ubuntu +TESTSTACK_DEBIAN_VERSION=bionic +TESTSTACK_PHP_VERSION=7.2 # Besides the eZ Kernel, our tests require NetgenTagsBundle, EzSystemsEzPlatformXmlTextFieldTypeBundle and EzSystemsMatrixBundle. # This in turn requires manual activation of EzSystemsEzPlatformGraphQLBundle and EzCoreExtraBundle. @@ -12,7 +13,7 @@ TETSTSTACK_PHP_VERSION=7.2 EZ_PACKAGES='ezsystems/ezplatform:~2.3.2 ezsystems/ezplatform-xmltext-fieldtype:^1.7 ezsystems/ezplatform-matrix-fieldtype:^1.0 netgen/tagsbundle:^3.2 ezsystems/behatbundle:^6.5 ezsystems/repository-forms:<=2.4 sensio/generator-bundle' EZ_BUNDLES='Kaliop\eZMigrationBundle\EzMigrationBundle EzSystems\EzPlatformXmlTextFieldTypeBundle\EzSystemsEzPlatformXmlTextFieldTypeBundle EzSystems\EzPlatformMatrixFieldtypeBundle\EzPlatformMatrixFieldtypeBundle Netgen\TagsBundle\NetgenTagsBundle Lolautruche\EzCoreExtraBundle\EzCoreExtraBundle EzSystems\EzPlatformGraphQL\EzSystemsEzPlatformGraphQLBundle' -# We use specifically version 8.0 here to exercise a code-path within the test-stack +# We use specifically version 8.0 here to exercise a code-path within the teststack via its CI setup MYSQL_VERSION=8.0 #DB_TYPE=postgresql diff --git a/doc/config_examples/bundle_with_extra_dependencies/.euts.2.4.env b/doc/config_examples/bundle_with_extra_dependencies/.euts.2.4.env index 7020be5..460d0c5 100644 --- a/doc/config_examples/bundle_with_extra_dependencies/.euts.2.4.env +++ b/doc/config_examples/bundle_with_extra_dependencies/.euts.2.4.env @@ -4,6 +4,8 @@ COMPOSE_PROJECT_NAME=kezmbt_24 # We use Debian 10 Buster, which comes with php 7.3 by default TESTSTACK_DEBIAN_VERSION=buster +# We specify the php version too. This is redundant in this case and is only used for teststack CI tests +TESTSTACK_PHP_VERSION=7.3 # Besides the eZ Kernel, our tests require NetgenTagsBundle, EzSystemsEzPlatformXmlTextFieldTypeBundle and EzSystemsMatrixBundle. # This in turn requires manual activation of EzCoreExtraBundle. @@ -12,5 +14,5 @@ TESTSTACK_DEBIAN_VERSION=buster EZ_PACKAGES='ezsystems/ezplatform:~2.4.2 ezsystems/ezplatform-xmltext-fieldtype:^1.8 ezsystems/ezplatform-matrix-fieldtype:^1.0 netgen/tagsbundle:^3.3 ezsystems/behatbundle:^6.5 sensio/generator-bundle' EZ_BUNDLES='Kaliop\eZMigrationBundle\EzMigrationBundle EzSystems\EzPlatformXmlTextFieldTypeBundle\EzSystemsEzPlatformXmlTextFieldTypeBundle EzSystems\EzPlatformMatrixFieldtypeBundle\EzPlatformMatrixFieldtypeBundle Netgen\TagsBundle\NetgenTagsBundle Lolautruche\EzCoreExtraBundle\EzCoreExtraBundle EzSystems\EzPlatformGraphQL\EzSystemsEzPlatformGraphQLBundle' -# We use specifically version 8.0 here to exercise a code-path within the test-stack +# We use specifically version 8.0 here to exercise a code-path within the teststack via its CI setup MYSQL_VERSION=8.0-debian diff --git a/doc/config_examples/bundle_with_extra_dependencies/.euts.2.5.env b/doc/config_examples/bundle_with_extra_dependencies/.euts.2.5.env index 7699f31..0da26e0 100644 --- a/doc/config_examples/bundle_with_extra_dependencies/.euts.2.5.env +++ b/doc/config_examples/bundle_with_extra_dependencies/.euts.2.5.env @@ -4,6 +4,8 @@ COMPOSE_PROJECT_NAME=kezmbt_25 # We use Debian 11 Bullseye, which comes with php 7.4 by default TESTSTACK_DEBIAN_VERSION=bullseye +# We specify the php version too. This is redundant in this case and is only used for the teststack CI tests +TESTSTACK_PHP_VERSION=7.4 # Besides the eZ Kernel, our tests require NetgenTagsBundle, EzSystemsEzPlatformXmlTextFieldTypeBundle and EzSystemsMatrixBundle. # This in turn requires manual activation of EzCoreExtraBundle. @@ -12,6 +14,6 @@ TESTSTACK_DEBIAN_VERSION=bullseye EZ_PACKAGES='ezsystems/ezplatform:^2.5.5 ezsystems/ezplatform-xmltext-fieldtype:^1.9 netgen/tagsbundle:^3.4 ezsystems/behatbundle:^7.0 sensio/generator-bundle overblog/graphiql-bundle' EZ_BUNDLES='Kaliop\eZMigrationBundle\EzMigrationBundle EzSystems\EzPlatformXmlTextFieldTypeBundle\EzSystemsEzPlatformXmlTextFieldTypeBundle Netgen\TagsBundle\NetgenTagsBundle Lolautruche\EzCoreExtraBundle\EzCoreExtraBundle' -# We use specifically mariadb version 10.6 here to exercise a code-path within the test-stack +# We use specifically mariadb version 10.6 here to exercise a code-path within the teststack via its CI setup DB_VENDOR=mariadb MYSQL_VERSION=10.6 diff --git a/doc/config_examples/bundle_with_extra_dependencies/.euts.3.0.env b/doc/config_examples/bundle_with_extra_dependencies/.euts.3.0.env index f4514c4..f03f6f3 100644 --- a/doc/config_examples/bundle_with_extra_dependencies/.euts.3.0.env +++ b/doc/config_examples/bundle_with_extra_dependencies/.euts.3.0.env @@ -4,6 +4,8 @@ COMPOSE_PROJECT_NAME=tcezmbt_30 # We use Debian 11 Buster which comes with php 7.3 by default TESTSTACK_DEBIAN_VERSION=buster +# We specify the php version too. This is redundant in this case and is only required for the teststack CI tests +TESTSTACK_PHP_VERSION=7.3 # symfony/web-profiler-bundle and symfony/debug-bundle required for behat envs (by ezplatform default config) # In dev envs, we also need symfony/maker-bundle and overblog/graphiql-bundle @@ -11,6 +13,6 @@ TESTSTACK_DEBIAN_VERSION=buster EZ_PACKAGES='ezsystems/ezplatform:^3.0.6 ezsystems/ezplatform-xmltext-fieldtype:^2.0 netgen/tagsbundle:^4.0.15 ezsystems/behatbundle:^8.0 symfony/web-profiler-bundle:^5.1 symfony/debug-bundle:^5.1 symfony/maker-bundle:^1.14 overblog/graphiql-bundle' EZ_BUNDLES='Kaliop\eZMigrationBundle\eZMigrationBundle EzSystems\EzPlatformXmlTextFieldTypeBundle\EzSystemsEzPlatformXmlTextFieldTypeBundle Netgen\TagsBundle\NetgenTagsBundle Lolautruche\EzCoreExtraBundle\EzCoreExtraBundle' -# We use specifically mariadb version 10.8 here to exercise a code-path within the test-stack +# We use specifically mariadb version 10.8 here to exercise a code-path within the teststack via its CI setup DB_VENDOR=mariadb MYSQL_VERSION=10.8 diff --git a/doc/config_examples/bundle_with_extra_dependencies/.euts.3.1.env b/doc/config_examples/bundle_with_extra_dependencies/.euts.3.1.env index 6f27fd8..9c2db6e 100644 --- a/doc/config_examples/bundle_with_extra_dependencies/.euts.3.1.env +++ b/doc/config_examples/bundle_with_extra_dependencies/.euts.3.1.env @@ -4,6 +4,8 @@ COMPOSE_PROJECT_NAME=tcezmbt_31 # We use Debian 11 Buster which comes with php 7.3 by default TESTSTACK_DEBIAN_VERSION=buster +# We specify the php version too. This is redundant in this case and is only required for the teststack CI tests +TESTSTACK_PHP_VERSION=7.3 # symfony/web-profiler-bundle and symfony/debug-bundle are required for behat envs (by ezplatform default config) # In dev envs, we also need symfony/maker-bundle and overblog/graphiql-bundle @@ -11,6 +13,6 @@ TESTSTACK_DEBIAN_VERSION=buster EZ_PACKAGES='ezsystems/ezplatform:^3.1.5 ezsystems/ezplatform-xmltext-fieldtype:^2.0 netgen/tagsbundle:^4.0.15 ezsystems/behatbundle:^8.0 symfony/web-profiler-bundle:^5.1 symfony/debug-bundle:^5.1 symfony/maker-bundle:^1.14 overblog/graphiql-bundle' EZ_BUNDLES='Kaliop\eZMigrationBundle\eZMigrationBundle EzSystems\EzPlatformXmlTextFieldTypeBundle\EzSystemsEzPlatformXmlTextFieldTypeBundle Netgen\TagsBundle\NetgenTagsBundle Lolautruche\EzCoreExtraBundle\EzCoreExtraBundle' -# We use specifically mariadb version 10.9 here to exercise a code-path within the test-stack +# We use specifically mariadb version 10.9 here to exercise a code-path within the teststack via its CI setup DB_VENDOR=mariadb MYSQL_VERSION=10.9 diff --git a/doc/config_examples/bundle_with_extra_dependencies/.euts.3.2.env b/doc/config_examples/bundle_with_extra_dependencies/.euts.3.2.env index 23d78f2..9ad835d 100644 --- a/doc/config_examples/bundle_with_extra_dependencies/.euts.3.2.env +++ b/doc/config_examples/bundle_with_extra_dependencies/.euts.3.2.env @@ -5,6 +5,8 @@ COMPOSE_PROJECT_NAME=tcezmbt_32 # We use Ubuntu 20 Focal which comes with php 7.4 by default TESTSTACK_OS_VENDOR=ubuntu TESTSTACK_DEBIAN_VERSION=focal +# We specify the php version too. This is redundant in this case and is only required for the teststack CI tests +TESTSTACK_PHP_VERSION=7.4 # symfony/web-profiler-bundle and symfony/debug-bundle required for behat envs (by ezplatform default config) # In dev envs, we also need overblog/graphiql-bundle and symfony/maker-bundle @@ -12,5 +14,5 @@ TESTSTACK_DEBIAN_VERSION=focal EZ_PACKAGES='ezsystems/ezplatform:^3.2.8 ezsystems/ezplatform-xmltext-fieldtype:^2.0.2 netgen/tagsbundle:^4.0.18 ezsystems/behatbundle:^8.0 symfony/web-profiler-bundle:^5.1 symfony/debug-bundle:^5.1 symfony/maker-bundle:^1.14 overblog/graphiql-bundle' EZ_BUNDLES='Kaliop\eZMigrationBundle\eZMigrationBundle EzSystems\EzPlatformXmlTextFieldTypeBundle\EzSystemsEzPlatformXmlTextFieldTypeBundle Netgen\TagsBundle\NetgenTagsBundle Lolautruche\EzCoreExtraBundle\EzCoreExtraBundle' -# We use specifically version 5.7 here to exercise a code-path within the test-stack +# We use specifically version 5.7 here to exercise a code-path within the teststack via its CI setup MYSQL_VERSION=5.7 diff --git a/doc/config_examples/bundle_with_extra_dependencies/.euts.3.3.env b/doc/config_examples/bundle_with_extra_dependencies/.euts.3.3.env index 58f755c..91c2277 100644 --- a/doc/config_examples/bundle_with_extra_dependencies/.euts.3.3.env +++ b/doc/config_examples/bundle_with_extra_dependencies/.euts.3.3.env @@ -2,7 +2,7 @@ # Use a specific project name - always a good idea when you plan to test the same bundle in different configurations COMPOSE_PROJECT_NAME=tcezmbt_32 -# We use Debian 11 Buster which comes with php 8.1 by default, downgraded to 8.0 +# We use Ubuntu 22 Jammy which comes with php 8.1 by default, downgraded to 8.0 TESTSTACK_OS_VENDOR=ubuntu TESTSTACK_DEBIAN_VERSION=jammy TETSTSTACK_PHP_VERSION=8.0 @@ -10,5 +10,5 @@ TETSTSTACK_PHP_VERSION=8.0 EZ_PACKAGES='ibexa/oss-skeleton:^3.3.13 netgen/tagsbundle:^4.0.18 ezsystems/behatbundle:^8.3.6 overblog/graphiql-bundle:^0.2.1' EZ_BUNDLES='Kaliop\eZMigrationBundle\eZMigrationBundle Netgen\TagsBundle\NetgenTagsBundle Lolautruche\EzCoreExtraBundle\EzCoreExtraBundle' -# We use specifically version 8.0 here to exercise a code-path within the test-stack +# We use specifically version 8.0 here to exercise a code-path within the teststack via its CI setup MYSQL_VERSION=8.0 diff --git a/doc/config_examples/bundle_with_extra_dependencies/.euts.cp.env b/doc/config_examples/bundle_with_extra_dependencies/.euts.cp.env index dcd97d0..63c4ed6 100644 --- a/doc/config_examples/bundle_with_extra_dependencies/.euts.cp.env +++ b/doc/config_examples/bundle_with_extra_dependencies/.euts.cp.env @@ -4,6 +4,8 @@ COMPOSE_PROJECT_NAME=kezmbt_cp # We use Debian Jessie for the container OS as it comes with php 5.6 by default TESTSTACK_DEBIAN_VERSION=jessie +# We specify the php version too. This is redundant in this case and is only required for the teststack CI tests +TESTSTACK_PHP_VERSION=5.6 # Besides the eZ Kernel, our tests require NetgenTagsBundle and EzSystemsMatrixBundle EZ_PACKAGES='ezsystems/ezpublish-community:~2014.11.1 ezsystems/ez-matrix-bundle:^0.1 netgen/tagsbundle:^2.0 ezsystems/behatbundle:^5.4.2' @@ -17,5 +19,5 @@ EZ_BUNDLES='Kaliop\eZMigrationBundle\EzMigrationBundle EzSystems\MatrixBundle\Ez # 3. pre-calculate the set of dependencies on another computer with plenty of GB of RAM, store the produced composer.lock # file and replace the env var EZ_PACKAGES above with EZ_COMPOSER_LOCK, pointing to the file's location -# We use specifically version 5.7 here to exercise a code-path within the test-stack +# We use specifically version 5.7 here to exercise a code-path within the teststack via its CI setup MYSQL_VERSION=5.7 diff --git a/doc/config_examples/github_actions.yml b/doc/config_examples/github_actions.yml index 73f8785..9ce881d 100644 --- a/doc/config_examples/github_actions.yml +++ b/doc/config_examples/github_actions.yml @@ -1,4 +1,4 @@ -# An example GitHub Actions configuration file for a bundle which aims to be compatible with both eZPublish 5 and eZPlatform. +# An example GitHub Actions configuration file for a bundle which aims to be compatible with both eZPublish 5 and eZPlatform 1 and 2. # We use kaliop/ezmigrationbundle as an example. name: CI @@ -23,81 +23,111 @@ jobs: EZ_BUNDLES: ${{ matrix.ez_bundles }} EZ_PACKAGES: ${{ matrix.ez_packages }} strategy: - # A wide test matrix - running tests at least once for each stable PHP version, and across as many different versions - # as possible of eZPublish / eZPlatform. - # Besides the bundle under test (Kaliop\eZMigrationBundle\EzMigrationBundle), the tests require, when available for - # the current eZ kernel, the presence of ezplatform-xmltext-fieldtype, ez-matrix-bundle, tagsbundle, ezplatform-matrix-fieldtype. + # A wide test matrix - running tests at least once for each stable PHP version, and across as many different + # versions as possible of eZPublish / eZPlatform 1 and 2. + # Besides the bundle under test (Kaliop\eZMigrationBundle\EzMigrationBundle), the tests require, when available + # for the current eZ kernel, the presence of ezplatform-xmltext-fieldtype, tagsbundle, ez-matrix-bundle or + # ezplatform-matrix-fieldtype. # Extra composer packages are required to be installed and extra Symfony Bundles are required to be activated - # as dependencies, depending on the current eZ kernel, just to be able for the kernel to run. + # as dependencies, depending on the current eZ kernel, just to be able for the kernel to run with the 'behat' env. matrix: - # @see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners for available os versions - # (note that we'd prefer sticking with ubuntu 18 as it comes with mysql 5.7, but that has been discontinued by GitHub) + # @see https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners for + # available os versions (note that we'd prefer sticking with ubuntu 18 as it comes with mysql 5.7, + # but that has been discontinued by GitHub) include: # eZ Publish Platform, aka 5.4 - - php: '5.6' + - ezp: '5.4' # added just to make the GHA GUI nicer + php: '5.6' ez_bundles: 'Kaliop\eZMigrationBundle\EzMigrationBundle EzSystems\MatrixBundle\EzSystemsMatrixBundle Netgen\TagsBundle\NetgenTagsBundle' # Composer takes too much time and memory for our dependencies when running on PHP 5.6. - # So we use a pre-calculated composer.lock file for installing dependencies instead of a list of packages - # (the lock file is stored within our bundle's source code) + # So we use a pre-calculated composer.lock file for installing dependencies instead of a list of + # packages (the lock file is stored within our bundle's source code) + # In this case ez_packages is ignored for dependencies installation, but it is used by teststack + # scripts as indicator of the ezp version in use + ez_packages: 'ezsystems/ezpublish-community:~2014.11.1' ez_composer_lock: Tests/composer/composer-cp_2104.11.1.lock operating-system: 'ubuntu-20.04' # eZ Platform 1 - - php: '7.0' + - ezp: '1.7' + php: '7.0' ez_bundles: 'Kaliop\eZMigrationBundle\EzMigrationBundle EzSystems\EzPlatformXmlTextFieldTypeBundle\EzSystemsEzPlatformXmlTextFieldTypeBundle EzSystems\MatrixBundle\EzSystemsMatrixBundle Netgen\TagsBundle\NetgenTagsBundle' ez_packages: 'ezsystems/ezplatform:~1.7.9 ezsystems/ezplatform-xmltext-fieldtype:^1.1 ezsystems/ez-matrix-bundle:^0.2.1 netgen/tagsbundle:^2.2 ezsystems/behatbundle:^6.3' ez_composer_lock: '' operating-system: 'ubuntu-20.04' - - php: '7.1' + - ezp: '1.13' + php: '7.1' ez_bundles: 'Kaliop\eZMigrationBundle\EzMigrationBundle EzSystems\EzPlatformXmlTextFieldTypeBundle\EzSystemsEzPlatformXmlTextFieldTypeBundle EzSystems\MatrixBundle\EzSystemsMatrixBundle Netgen\TagsBundle\NetgenTagsBundle' ez_packages: 'ezsystems/ezplatform:~1.13.5 ezsystems/ezplatform-xmltext-fieldtype:^1.1 ezsystems/ez-matrix-bundle:^0.2.1 netgen/tagsbundle:^2.2 ezsystems/behatbundle:^6.3' ez_composer_lock: '' operating-system: 'ubuntu-20.04' # eZ Platform 2 - - php: '7.2' + - ezp: '2.3' + php: '7.2' ez_bundles: 'Kaliop\eZMigrationBundle\EzMigrationBundle EzSystems\EzPlatformXmlTextFieldTypeBundle\EzSystemsEzPlatformXmlTextFieldTypeBundle EzSystems\EzPlatformMatrixFieldtypeBundle\EzPlatformMatrixFieldtypeBundle EzSystems\EzPlatformGraphQL\EzSystemsEzPlatformGraphQLBundle Netgen\TagsBundle\NetgenTagsBundle Lolautruche\EzCoreExtraBundle\EzCoreExtraBundle' ez_packages: 'ezsystems/ezplatform:~2.3.2 ezsystems/ezplatform-xmltext-fieldtype:^1.7 ezsystems/ezplatform-matrix-fieldtype:^1.0 netgen/tagsbundle:^3.2 ezsystems/behatbundle:^6.5 ezsystems/repository-forms:<=2.4 sensio/generator-bundle' ez_composer_lock: '' operating-system: 'ubuntu-22.04' - - php: '7.3' + - ezp: '2.4' + php: '7.3' ez_bundles: 'Kaliop\eZMigrationBundle\EzMigrationBundle EzSystems\EzPlatformXmlTextFieldTypeBundle\EzSystemsEzPlatformXmlTextFieldTypeBundle EzSystems\EzPlatformMatrixFieldtypeBundle\EzPlatformMatrixFieldtypeBundle EzSystems\EzPlatformGraphQL\EzSystemsEzPlatformGraphQLBundle Netgen\TagsBundle\NetgenTagsBundle Lolautruche\EzCoreExtraBundle\EzCoreExtraBundle' ez_packages: 'ezsystems/ezplatform:~2.4.2 ezsystems/ezplatform-xmltext-fieldtype:^1.8 ezsystems/ezplatform-matrix-fieldtype:^1.0 netgen/tagsbundle:^3.3 ezsystems/behatbundle:^6.5 sensio/generator-bundle' ez_composer_lock: '' operating-system: 'ubuntu-22.04' - - php: '7.4' + - ezp: '2.5' + php: '7.4' ez_bundles: 'Kaliop\eZMigrationBundle\EzMigrationBundle EzSystems\EzPlatformXmlTextFieldTypeBundle\EzSystemsEzPlatformXmlTextFieldTypeBundle Netgen\TagsBundle\NetgenTagsBundle Lolautruche\EzCoreExtraBundle\EzCoreExtraBundle' ez_packages: 'ezsystems/ezplatform:^2.5.15 ezsystems/ezplatform-xmltext-fieldtype:^1.9 netgen/tagsbundle:^3.4 ezsystems/behatbundle:^7.0 sensio/generator-bundle overblog/graphiql-bundle' ez_composer_lock: '' operating-system: 'ubuntu-22.04' # eZ Platform 3 aka Ibexa BXP - # ... + # Rinse and repeat... + # For valid bundle/package combinations, see the .euts files in the folder `bundle_with_extra_dependencies` steps: # Optional: set up composer cache dir to persist across test runs; install extra sw packages; stop unused # services, etc - # Check out the source code + name: check out the source code uses: actions/checkout@v2 - # Retrieve the TestStack tool # Note: you might want to lock the checkout to a specific branch or tag to avoid surprises... + name: download the tests tack run: | git clone --depth 1 https://github.com/tanoconsulting/euts.git teststack # just in case... chmod 755 ./teststack/bin/*.sh ./teststack/bin/setup/*.sh - - # Run the TestStack tool setup script. This runs Composer, sets up an appropriate php and eZ configuration - # and creates a db schema with default data. + # Run the TestStack tool setup script. This runs Composer, sets up an appropriate PHP and eZ configuration, + # creates a db schema and loads it with default data. + name: set up the tests tack run: './teststack/bin/setup.sh' env: # This is useful to avoid sporadic test failures due to reaching API limits GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # This simply runs phpunit + name: run tests run: './teststack/bin/runtests.sh' # In case you want to run the tests with code coverage enabled and upload the results to some external service #- + # name: run tests and upload code coverage # run: | # ./teststack/bin/runtests.sh -c coverage.clover # if [ -f coverage.clover ]; then wget https://scrutinizer-ci.com/ocular.phar && php ocular.phar code-coverage:upload --format=php-clover coverage.clover; fi # if [ -f coverage.clover ]; then curl -Os https://uploader.codecov.io/latest/linux/codecov && chmod +x codecov && ./codecov -t ${CODECOV_TOKEN} -f coverage.clover; fi + + # To help troubleshooting failures, you can dump as much info as possible + # TODO dump as well eZPlatform and eZ-Legacy logs + #- + # name: troubleshoot + # if: ${{ failure() }} + # run: | + # systemctl list-units --all --type=service --no-pager | grep running + # ps auxwww + # dpkg --list | grep php + # env + # php -i + # sudo cat /var/log/php*.log diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 4e08b97..2c961dc 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -11,7 +11,7 @@ services: debian_version: ${TESTSTACK_DEBIAN_VERSION:-buster} debian_mirror: ${TESTSTACK_DEBIAN_MIRROR:-none} do_update_os: ${TESTSTACK_UPDATE_OS_ON_BUILD:-true} - # @todo use PHP_VERSION and default to TESTSTACK_PHP_VERSION if that one is unset + # @todo test using ${TESTSTACK_PHP_VERSION:-${PHP_VERSION:-default}} php_version: ${TESTSTACK_PHP_VERSION:-default} project_name: ${COMPOSE_PROJECT_NAME:-euts} timezone: ${TESTSTACK_TZ:-none} @@ -27,7 +27,7 @@ services: # Note that leaving this an empty default ha an effect on the name of the vendor folder and composer files which get set up - COMPOSE_PROJECT_NAME - TESTSTACK_SETUP_APP_ON_BOOT - # @todo use PHP_VERSION and default to TESTSTACK_PHP_VERSION if that one is unset + # unluckily using PHP_VERSION=${TESTSTACK_PHP_VERSION:-${PHP_VERSION}} does not work - TESTSTACK_PHP_VERSION ## Database configuration - DB_TYPE=${DB_TYPE:-mysql} diff --git a/docker/images/ez/root/build/createuser.sh b/docker/images/ez/root/build/createuser.sh index 1d40ebe..c19bea9 100755 --- a/docker/images/ez/root/build/createuser.sh +++ b/docker/images/ez/root/build/createuser.sh @@ -2,6 +2,8 @@ # @todo make the name of the user variable, as well as its GID & UID +echo "Creating user 'test'..." + addgroup --gid 1013 test adduser --system --uid=1013 --gid=1013 --home /home/test --shell /bin/bash test adduser test test @@ -13,3 +15,5 @@ adduser test sudo sed -i '$ a test ALL=\(ALL:ALL\) NOPASSWD: ALL' /etc/sudoers chown -R test:test /home/test + +echo Done diff --git a/docker/images/ez/root/build/getcomposer.sh b/docker/images/ez/root/build/getcomposer.sh index 949a1df..6ed8cd4 100755 --- a/docker/images/ez/root/build/getcomposer.sh +++ b/docker/images/ez/root/build/getcomposer.sh @@ -4,6 +4,8 @@ # @todo support a different target install dir / filename +echo "Installing Composer..." + COMPOSER_VERSION="$1" if [ -n "${COMPOSER_VERSION}" ]; then COMPOSER_VERSION="--${COMPOSER_VERSION}" @@ -28,4 +30,7 @@ fi php composer-setup.php $COMPOSER_VERSION --install-dir=/usr/local/bin --filename=composer RESULT=$? rm composer-setup.php + +echo Done + exit $RESULT diff --git a/docker/images/ez/root/build/getpackages.sh b/docker/images/ez/root/build/getpackages.sh index aa9ecc4..b7b3627 100755 --- a/docker/images/ez/root/build/getpackages.sh +++ b/docker/images/ez/root/build/getpackages.sh @@ -9,6 +9,8 @@ # @todo allow optional install of custom packages (is it better here or at boot time?) # @todo in case this file is used outside of docker: check that os is debian/ubuntu before trying to install php +echo "Installing software packages..." + PHP_VERSION=$1 # `lsb-release` is not yet onboard... DEBIAN_VERSION=$(cat /etc/os-release | grep 'VERSION_CODENAME=' | sed 's/VERSION_CODENAME=//') @@ -60,5 +62,9 @@ else DEBIAN_FRONTEND=noninteractive apt-get install -y npm fi -# @todo what if we are not in the correct dir? -./getphp.sh "${PHP_VERSION}" +echo Done + +if [ -n "${PHP_VERSION}" ]; then + # @todo what if we are not in the correct dir? + ./getphp.sh "${PHP_VERSION}" norefresh +fi diff --git a/docker/images/ez/root/build/getphp.sh b/docker/images/ez/root/build/getphp.sh index 9c52b74..00f0e77 100755 --- a/docker/images/ez/root/build/getphp.sh +++ b/docker/images/ez/root/build/getphp.sh @@ -9,12 +9,30 @@ # @todo this file can now be used outside of docker. Check that os is debian/ubuntu before trying to install php # @todo test the matrix of ubuntu versions (xenial, bionic, focal, jammy) vs. all php versions incl. 'default' +echo "Installing the required php version..." + set -e # install php PHP_VERSION="$1" + +if [ -z "${PHP_VERSION}" ]; then + printf "\n\e[31mERROR:\e[0m unknown PHP version to install\n\n" >&2 + exit 1 +fi + DEBIAN_VERSION=$(lsb_release -s -c) +# we refresh the apt cache here, in case this is executed outside getpackages.sh +if [ "$2" != norefresh ]; then + apt-get update +fi + +# a small shortcut to simplify the logic later +if [ "${PHP_VERSION}" = 5.6 -a "${DEBIAN_VERSION}" = jessie ]; then + PHP_VERSION=default +fi + if [ "${PHP_VERSION}" = default ]; then if [ "${DEBIAN_VERSION}" = jessie -o "${DEBIAN_VERSION}" = precise -o "${DEBIAN_VERSION}" = trusty ]; then PHPSUFFIX=5 @@ -42,13 +60,16 @@ if [ "${PHP_VERSION}" = default ]; then php${PHPSUFFIX}-xdebug \ ${EXTRA_PACKAGES} else - if update-alternatives --list php 2>/dev/null | fgrep -q "php${PHP_VERSION}"; then - : + if apt-cache show "^php${PHP_VERSION}$" >/dev/null 2>/dev/null; then + echo "PHP version found in existing apt repositories" + elif update-alternatives --list php 2>/dev/null | fgrep -q "php${PHP_VERSION}"; then + echo "PHP version found in update-alternatives" else # The correct php version is not available. Set up custom repos to get it + echo "PHP version not found in existing apt repositories, setting up the ondrej one" # On GHA runners ubuntu version, many php versions are preinstalled. We remove them if found. - # NB: this takes quite some time to execute. We should allow it optionally + # NB: this takes quite some time to execute. We should allow to execute it on demand #for PHP_CURRENT in $(dpkg -l | grep -E 'php.+-common' | awk '{print $2}'); do # if [ "${PHP_CURRENT}" != "php${PHP_VERSION}-common" ]; then # apt-get purge -y "${PHP_CURRENT}" @@ -65,7 +86,7 @@ else fi EXTRA_PACKAGES= - if [ "${PHP_VERSION}" != '8.0' -a "${PHP_VERSION}" != '8.1' ]; then + if [ "${PHP_VERSION}" != '8.0' -a "${PHP_VERSION}" != '8.1' -a "${PHP_VERSION}" != '8.2' ]; then EXTRA_PACKAGES="php${PHP_VERSION}-json" fi @@ -86,4 +107,9 @@ else update-alternatives --set php /usr/bin/php${PHP_VERSION} fi +# Left in in case we'd want to check we really got what we asked for... +#PHPVER=$(php -r 'echo implode(".",array_slice(explode(".",PHP_VERSION),0,2));' 2>/dev/null) + php -v + +echo Done diff --git a/todo.txt b/todo.txt index 39f914b..886603f 100644 --- a/todo.txt +++ b/todo.txt @@ -13,11 +13,15 @@ v0.y - more test coverage, cleanups - make it easier to understand which env vars apply only to the docker version of the stack and which ones apply as well to the CI workers. Start with PHP_VERSION, MYSQL_VERSION -- bring back composer cache to /home/$user/.composer when on gha - add some chown at container build and boot times? - (look also at https://github.com/actions/cache/blob/main/examples.md#php---composer to make it persistent - across builds) +- make sure that composer cache is saved in ./docker/data/.composer from the containers (but take care about the case of + parallel runs of composer install...) -- move composer.json from tests to doc/ (once we removed from it cache-dir) +- bring composer cache to $(pwd)/docker/data/.composer when on gha - add some chown at container build and boot times? + or make it a symlink to a folder outside the code dir and make it persistent across builds - look at + https://github.com/actions/cache/blob/main/examples.md#php---composer + Also, prefer COMPOSER_CACHE_DIR in ci.yml to setting it in composer.json + +- check if we can use `env:` in place of all `export` lines in the steps of ci.yml - add .travis.yml for self-testing on Travis (either without docker use, or using ubuntu as base for containers) @@ -49,14 +53,13 @@ v0.z - features - improve finding ./docker vs /home/test/teststack/docker in php.sh, composer.sh -- docs: finish 3 sets of example .euts.env files: minimal, with LB, complex (ezmb) - also: bundle w. legacy ext; pure-legacy ext +- docs: add other sets of example .euts.env files: minimal, with LB, bundle w. legacy ext; pure-legacy ext - make teststack create a full config file by default instead of an empty one ? at least have an action to create it / print it - allow project to specify a different test execution command from phpunit (or rename runtests) ? -- port from phpxmlrpc the enabling/disabling of code coverage (check differences wrt. what we do here) +- port from phpxmlrpc the enabling/disabling of code coverage (is it still needed? check differences wrt. what we do here) - remove 'silence php warnings' from default php config; push it to consumer bundles ? (via: allow custom php configs...) @@ -75,7 +78,7 @@ vN? images are pre-loaded on gha ubuntu 20, 22 workers) - how to specify custom legacy configs for test setups ? (see legacy-bridge way of doing minimal config) -- do we need to run commands to install ezpl/legacy assets on setup ? +- do we need to run commands to install ezpl/legacy assets on setup ? (partially done for ezpl 3.3...) - make 'll' work for 'test' user @@ -101,7 +104,6 @@ vN? - also: do we need to run any update sql when creating the mysql schema? - make it easy to have many different test envs installed and possibly running in parallel: - - need to add custom network subnets ? - add a cli command for that - document it @@ -112,6 +114,8 @@ vN? - test execution of tests based on other test frameworks than phpunit: ... +- test using a different Sf env than `behat` + - test usage together with https://github.com/g1a/composer-test-scenarios - check best method for teststack installation (git vs. curl+sh) @@ -119,8 +123,6 @@ vN? - set APP_ENV and SYMFONY_ENV if unset ? - teststack: add a check for min docker, docker-compose version (note: seems like we can use --env-file only since docker-compose 1.24) - also: give to the user a friendlier error message if she's not in the docker group -- review ez docker build: - - use a shell script for all steps, to make it easy to fully provision on boot instead of build - allow to use custom siteaccess names ? - allow to install different mysql clients (at least for debian versions which have them) - make installation of java in ez container optional. Also: add pstotext/pdftotext