From e5edbf14828c3c7a828e19361e27bd5436388b0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 4 Apr 2022 12:11:39 +0200 Subject: [PATCH 1/8] Add workflows for phpunit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- .../phpunit-mysql.properties.json | 11 ++ workflow-templates/phpunit-mysql.yml | 102 ++++++++++++++++++ .../phpunit-oci.properties.json | 11 ++ workflow-templates/phpunit-oci.yml | 94 ++++++++++++++++ .../phpunit-pgsql.properties.json | 11 ++ workflow-templates/phpunit-pgsql.yml | 99 +++++++++++++++++ .../phpunit-sqlite.properties.json | 11 ++ workflow-templates/phpunit-sqlite.yml | 88 +++++++++++++++ 8 files changed, 427 insertions(+) create mode 100644 workflow-templates/phpunit-mysql.properties.json create mode 100644 workflow-templates/phpunit-mysql.yml create mode 100644 workflow-templates/phpunit-oci.properties.json create mode 100644 workflow-templates/phpunit-oci.yml create mode 100644 workflow-templates/phpunit-pgsql.properties.json create mode 100644 workflow-templates/phpunit-pgsql.yml create mode 100644 workflow-templates/phpunit-sqlite.properties.json create mode 100644 workflow-templates/phpunit-sqlite.yml diff --git a/workflow-templates/phpunit-mysql.properties.json b/workflow-templates/phpunit-mysql.properties.json new file mode 100644 index 00000000..f7170af0 --- /dev/null +++ b/workflow-templates/phpunit-mysql.properties.json @@ -0,0 +1,11 @@ +{ + "name": "PHPUnit mysql", + "description": "Run PHPUnit tests on mysql database", + "iconName": "phpunit", + "categories": [ + "PHP" + ], + "filePatterns": [ + "^tests/phpunit.xml$" + ] +} diff --git a/workflow-templates/phpunit-mysql.yml b/workflow-templates/phpunit-mysql.yml new file mode 100644 index 00000000..194224d3 --- /dev/null +++ b/workflow-templates/phpunit-mysql.yml @@ -0,0 +1,102 @@ +name: PHPUnit + +on: + pull_request: + push: + branches: + - master + - stable* + +env: + # Location of the phpunit.xml and phpunit.integration.xml files + # Comment to disable + PHPUNIT_CONFIG: ./tests/phpunit.xml + PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml + +jobs: + phpunit-mysql: + runs-on: ubuntu-latest + + strategy: + # do not stop on another job's failure + fail-fast: false + matrix: + php-versions: ['7.4', '8.0', '8.1'] + server-versions: ['master'] + + services: + mysql: + image: mariadb:10.5 + ports: + - 4444:3306/tcp + env: + MYSQL_ROOT_PASSWORD: rootpassword + options: --health-cmd="mysqladmin ping" --health-interval 5s --health-timeout 2s --health-retries 5 + + steps: + - name: Set app env + run: | + # Split and keep last + echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + + - name: Enable ONLY_FULL_GROUP_BY MySQL option + run: | + echo "SET GLOBAL sql_mode=(SELECT CONCAT(@@sql_mode,',ONLY_FULL_GROUP_BY'));" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword + echo "SELECT @@sql_mode;" | mysql -h 127.0.0.1 -P 4444 -u root -prootpassword + + - name: Checkout server + uses: actions/checkout@v3 + with: + submodules: true + repository: nextcloud/server + ref: ${{ matrix.server-versions }} + + - name: Checkout app + uses: actions/checkout@v3 + with: + path: apps/${{ env.APP_NAME }} + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: phpunit + extensions: mbstring, iconv, fileinfo, intl, mysql, pdo_mysql + coverage: none + + - name: Set up PHPUnit + working-directory: apps/${{ env.APP_NAME }} + run: composer i + + - name: Set up Nextcloud + env: + DB_PORT: 4444 + run: | + mkdir data + ./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password + ./occ app:enable --force ${{ env.APP_NAME }} + php -S localhost:8080 & + + - name: PHPUnit + # Only run if phpunit config file exists + if: env.PHPUNIT_CONFIG != '' + working-directory: apps/${{ env.APP_NAME }} + run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} + + - name: PHPUnit integration + # Only run if phpunit integration config file exists + if: env.PHPUNIT_INTEGRATION_CONFIG != '' + working-directory: apps/${{ env.APP_NAME }} + run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} + + summary: + runs-on: ubuntu-latest + needs: phpunit-mysql + + if: always() + + name: phpunit-mysql-summary + + steps: + - name: Summary status + run: if ${{ needs.phpunit-mysql.result != 'success' }}; then exit 1; fi diff --git a/workflow-templates/phpunit-oci.properties.json b/workflow-templates/phpunit-oci.properties.json new file mode 100644 index 00000000..03acec5a --- /dev/null +++ b/workflow-templates/phpunit-oci.properties.json @@ -0,0 +1,11 @@ +{ + "name": "PHPUnit oci", + "description": "Run PHPUnit tests on oci database", + "iconName": "phpunit", + "categories": [ + "PHP" + ], + "filePatterns": [ + "^tests/phpunit.xml$" + ] +} diff --git a/workflow-templates/phpunit-oci.yml b/workflow-templates/phpunit-oci.yml new file mode 100644 index 00000000..b9d4c995 --- /dev/null +++ b/workflow-templates/phpunit-oci.yml @@ -0,0 +1,94 @@ +name: PHPUnit + +on: + pull_request: + push: + branches: + - master + - stable* + +env: + # Location of the phpunit.xml and phpunit.integration.xml files + # Comment to disable + PHPUNIT_CONFIG: ./tests/phpunit.xml + PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml + +jobs: + phpunit-oci: + runs-on: ubuntu-20.04 + + strategy: + # do not stop on another job's failure + fail-fast: false + matrix: + php-versions: ['8.0'] + server-versions: ['master'] + + services: + oracle: + image: deepdiver/docker-oracle-xe-11g # 'wnameless/oracle-xe-11g-r2' + ports: + - 1521:1521/tcp + + steps: + - name: Set app env + run: | + # Split and keep last + echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + + - name: Checkout server + uses: actions/checkout@v3 + with: + submodules: true + repository: nextcloud/server + ref: ${{ matrix.server-versions }} + + - name: Checkout app + uses: actions/checkout@v3 + with: + path: apps/${{ env.APP_NAME }} + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + extensions: mbstring, fileinfo, intl, sqlite, pdo_sqlite, oci8 + tools: phpunit + coverage: none + + - name: Set up PHPUnit + working-directory: apps/${{ env.APP_NAME }} + run: composer i + + - name: Set up Nextcloud + env: + DB_PORT: 1521 + run: | + mkdir data + ./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin + ./occ app:enable --force ${{ env.APP_NAME }} + php -S localhost:8080 & + + - name: PHPUnit + # Only run if phpunit config file exists + if: env.PHPUNIT_CONFIG != '' + working-directory: apps/${{ env.APP_NAME }} + run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} + + - name: PHPUnit integration + # Only run if phpunit integration config file exists + if: env.PHPUNIT_INTEGRATION_CONFIG != '' + working-directory: apps/${{ env.APP_NAME }} + run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} + + summary: + runs-on: ubuntu-latest + needs: phpunit-oci + + if: always() + + name: phpunit-oci-summary + + steps: + - name: Summary status + run: if ${{ needs.phpunit-oci.result != 'success' }}; then exit 1; fi diff --git a/workflow-templates/phpunit-pgsql.properties.json b/workflow-templates/phpunit-pgsql.properties.json new file mode 100644 index 00000000..611186d6 --- /dev/null +++ b/workflow-templates/phpunit-pgsql.properties.json @@ -0,0 +1,11 @@ +{ + "name": "PHPUnit pgsql", + "description": "Run PHPUnit tests on postgresql database", + "iconName": "phpunit", + "categories": [ + "PHP" + ], + "filePatterns": [ + "^tests/phpunit.xml$" + ] +} diff --git a/workflow-templates/phpunit-pgsql.yml b/workflow-templates/phpunit-pgsql.yml new file mode 100644 index 00000000..003f64e8 --- /dev/null +++ b/workflow-templates/phpunit-pgsql.yml @@ -0,0 +1,99 @@ +name: PHPUnit + +on: + pull_request: + push: + branches: + - master + - stable* + +env: + # Location of the phpunit.xml and phpunit.integration.xml files + # Comment to disable + PHPUNIT_CONFIG: ./tests/phpunit.xml + PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml + +jobs: + phpunit-pgsql: + runs-on: ubuntu-latest + + strategy: + # do not stop on another job's failure + fail-fast: false + matrix: + php-versions: ['8.0'] + server-versions: ['master'] + + services: + postgres: + image: postgres + ports: + - 4444:5432/tcp + env: + POSTGRES_USER: root + POSTGRES_PASSWORD: rootpassword + POSTGRES_DB: nextcloud + options: --health-cmd pg_isready --health-interval 5s --health-timeout 2s --health-retries 5 + + steps: + - name: Set app env + run: | + # Split and keep last + echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + + - name: Checkout server + uses: actions/checkout@v3 + with: + submodules: true + repository: nextcloud/server + ref: ${{ matrix.server-versions }} + + - name: Checkout app + uses: actions/checkout@v3 + with: + path: apps/${{ env.APP_NAME }} + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: phpunit + extensions: mbstring, iconv, fileinfo, intl, pgsql, pdo_pgsql + coverage: none + + - name: Set up PHPUnit + working-directory: apps/${{ env.APP_NAME }} + run: composer i + + - name: Set up Nextcloud + env: + DB_PORT: 4444 + run: | + mkdir data + ./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password + ./occ app:enable --force ${{ env.APP_NAME }} + php -S localhost:8080 & + + - name: PHPUnit + # Only run if phpunit config file exists + if: env.PHPUNIT_CONFIG != '' + working-directory: apps/${{ env.APP_NAME }} + run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} + + - name: PHPUnit integration + # Only run if phpunit integration config file exists + if: env.PHPUNIT_INTEGRATION_CONFIG != '' + working-directory: apps/${{ env.APP_NAME }} + run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} + + summary: + runs-on: ubuntu-latest + needs: phpunit-pgsql + + if: always() + + name: phpunit-pgsql-summary + + steps: + - name: Summary status + run: if ${{ needs.phpunit-pgsql.result != 'success' }}; then exit 1; fi diff --git a/workflow-templates/phpunit-sqlite.properties.json b/workflow-templates/phpunit-sqlite.properties.json new file mode 100644 index 00000000..50a195db --- /dev/null +++ b/workflow-templates/phpunit-sqlite.properties.json @@ -0,0 +1,11 @@ +{ + "name": "PHPUnit sqlite", + "description": "Run PHPUnit tests on sqlite database", + "iconName": "phpunit", + "categories": [ + "PHP" + ], + "filePatterns": [ + "^tests/phpunit.xml$" + ] +} diff --git a/workflow-templates/phpunit-sqlite.yml b/workflow-templates/phpunit-sqlite.yml new file mode 100644 index 00000000..38e56d1e --- /dev/null +++ b/workflow-templates/phpunit-sqlite.yml @@ -0,0 +1,88 @@ +name: PHPUnit + +on: + pull_request: + push: + branches: + - master + - stable* + +env: + # Location of the phpunit.xml and phpunit.integration.xml files + # Comment to disable + PHPUNIT_CONFIG: ./tests/phpunit.xml + PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml + +jobs: + phpunit-sqlite: + runs-on: ubuntu-latest + + strategy: + # do not stop on another job's failure + fail-fast: false + matrix: + php-versions: ['8.0'] + server-versions: ['master'] + + steps: + - name: Set app env + run: | + # Split and keep last + echo "APP_NAME=${GITHUB_REPOSITORY##*/}" >> $GITHUB_ENV + + - name: Checkout server + uses: actions/checkout@v3 + with: + submodules: true + repository: nextcloud/server + ref: ${{ matrix.server-versions }} + + - name: Checkout app + uses: actions/checkout@v3 + with: + path: apps/${{ env.APP_NAME }} + + - name: Set up php ${{ matrix.php-versions }} + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php-versions }} + tools: phpunit + extensions: mbstring, iconv, fileinfo, intl, sqlite, pdo_sqlite + coverage: none + + - name: Set up PHPUnit + working-directory: apps/${{ env.APP_NAME }} + run: composer i + + - name: Set up Nextcloud + env: + DB_PORT: 4444 + run: | + mkdir data + ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password + ./occ app:enable --force ${{ env.APP_NAME }} + php -S localhost:8080 & + + - name: PHPUnit + # Only run if phpunit config file exists + if: env.PHPUNIT_CONFIG != '' + working-directory: apps/${{ env.APP_NAME }} + run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} + + - name: PHPUnit integration + # Only run if phpunit integration config file exists + if: env.PHPUNIT_INTEGRATION_CONFIG != '' + working-directory: apps/${{ env.APP_NAME }} + run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} + + summary: + runs-on: ubuntu-latest + needs: phpunit-sqlite + + if: always() + + name: phpunit-sqlite-summary + + steps: + - name: Summary status + run: if ${{ needs.phpunit-sqlite.result != 'success' }}; then exit 1; fi From 5765f3bcefaa4e1d4f6e8bf381b677925eed3229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 4 Apr 2022 14:38:57 +0200 Subject: [PATCH 2/8] Add svg icon for PHPUnit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- workflow-templates/phpunit.svg | 138 +++++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 workflow-templates/phpunit.svg diff --git a/workflow-templates/phpunit.svg b/workflow-templates/phpunit.svg new file mode 100644 index 00000000..5e1011db --- /dev/null +++ b/workflow-templates/phpunit.svg @@ -0,0 +1,138 @@ + +image/svg+xml + + + + + + + + + + + + + + + + + + + + + + + + + + + From df2597f859aec1b387d60513b12448e277d3126c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Mon, 4 Apr 2022 17:22:33 +0200 Subject: [PATCH 3/8] Check for file existence to decide whether to start phpunit tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- workflow-templates/phpunit-mysql.yml | 17 ++++++++++++++--- workflow-templates/phpunit-oci.yml | 17 ++++++++++++++--- workflow-templates/phpunit-pgsql.yml | 19 +++++++++++++++---- workflow-templates/phpunit-sqlite.yml | 19 +++++++++++++++---- 4 files changed, 58 insertions(+), 14 deletions(-) diff --git a/workflow-templates/phpunit-mysql.yml b/workflow-templates/phpunit-mysql.yml index 194224d3..251e9982 100644 --- a/workflow-templates/phpunit-mysql.yml +++ b/workflow-templates/phpunit-mysql.yml @@ -9,7 +9,6 @@ on: env: # Location of the phpunit.xml and phpunit.integration.xml files - # Comment to disable PHPUNIT_CONFIG: ./tests/phpunit.xml PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml @@ -77,15 +76,27 @@ jobs: ./occ app:enable --force ${{ env.APP_NAME }} php -S localhost:8080 & + - name: Check file existence + id: check_files + uses: andstor/file-existence-action@v1 + with: + files: ${{ env.PHPUNIT_CONFIG }} + - name: PHPUnit # Only run if phpunit config file exists - if: env.PHPUNIT_CONFIG != '' + if: steps.check_files.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} + - name: Check file existence + id: check_files + uses: andstor/file-existence-action@v1 + with: + files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }} + - name: PHPUnit integration # Only run if phpunit integration config file exists - if: env.PHPUNIT_INTEGRATION_CONFIG != '' + if: steps.check_files.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} diff --git a/workflow-templates/phpunit-oci.yml b/workflow-templates/phpunit-oci.yml index b9d4c995..56eaf0bb 100644 --- a/workflow-templates/phpunit-oci.yml +++ b/workflow-templates/phpunit-oci.yml @@ -9,7 +9,6 @@ on: env: # Location of the phpunit.xml and phpunit.integration.xml files - # Comment to disable PHPUNIT_CONFIG: ./tests/phpunit.xml PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml @@ -69,15 +68,27 @@ jobs: ./occ app:enable --force ${{ env.APP_NAME }} php -S localhost:8080 & + - name: Check file existence + id: check_files + uses: andstor/file-existence-action@v1 + with: + files: ${{ env.PHPUNIT_CONFIG }} + - name: PHPUnit # Only run if phpunit config file exists - if: env.PHPUNIT_CONFIG != '' + if: steps.check_files.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} + - name: Check file existence + id: check_files + uses: andstor/file-existence-action@v1 + with: + files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }} + - name: PHPUnit integration # Only run if phpunit integration config file exists - if: env.PHPUNIT_INTEGRATION_CONFIG != '' + if: steps.check_files.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} diff --git a/workflow-templates/phpunit-pgsql.yml b/workflow-templates/phpunit-pgsql.yml index 003f64e8..409b24c2 100644 --- a/workflow-templates/phpunit-pgsql.yml +++ b/workflow-templates/phpunit-pgsql.yml @@ -9,7 +9,6 @@ on: env: # Location of the phpunit.xml and phpunit.integration.xml files - # Comment to disable PHPUNIT_CONFIG: ./tests/phpunit.xml PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml @@ -70,19 +69,31 @@ jobs: DB_PORT: 4444 run: | mkdir data - ./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password + ./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password ./occ app:enable --force ${{ env.APP_NAME }} php -S localhost:8080 & + - name: Check file existence + id: check_files + uses: andstor/file-existence-action@v1 + with: + files: ${{ env.PHPUNIT_CONFIG }} + - name: PHPUnit # Only run if phpunit config file exists - if: env.PHPUNIT_CONFIG != '' + if: steps.check_files.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} + - name: Check file existence + id: check_files + uses: andstor/file-existence-action@v1 + with: + files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }} + - name: PHPUnit integration # Only run if phpunit integration config file exists - if: env.PHPUNIT_INTEGRATION_CONFIG != '' + if: steps.check_files.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} diff --git a/workflow-templates/phpunit-sqlite.yml b/workflow-templates/phpunit-sqlite.yml index 38e56d1e..ad819112 100644 --- a/workflow-templates/phpunit-sqlite.yml +++ b/workflow-templates/phpunit-sqlite.yml @@ -9,7 +9,6 @@ on: env: # Location of the phpunit.xml and phpunit.integration.xml files - # Comment to disable PHPUNIT_CONFIG: ./tests/phpunit.xml PHPUNIT_INTEGRATION_CONFIG: ./tests/phpunit.integration.xml @@ -59,19 +58,31 @@ jobs: DB_PORT: 4444 run: | mkdir data - ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password + ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password ./occ app:enable --force ${{ env.APP_NAME }} php -S localhost:8080 & + - name: Check file existence + id: check_files + uses: andstor/file-existence-action@v1 + with: + files: ${{ env.PHPUNIT_CONFIG }} + - name: PHPUnit # Only run if phpunit config file exists - if: env.PHPUNIT_CONFIG != '' + if: steps.check_files.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} + - name: Check file existence + id: check_files + uses: andstor/file-existence-action@v1 + with: + files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }} + - name: PHPUnit integration # Only run if phpunit integration config file exists - if: env.PHPUNIT_INTEGRATION_CONFIG != '' + if: steps.check_files.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} From 22cd92a365e872b2c095192052ae48a2ff6a1b6a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 5 Apr 2022 07:37:44 +0200 Subject: [PATCH 4/8] Fix duplicate step ID Signed-off-by: Joas Schilling --- workflow-templates/phpunit-mysql.yml | 6 +++--- workflow-templates/phpunit-oci.yml | 6 +++--- workflow-templates/phpunit-pgsql.yml | 6 +++--- workflow-templates/phpunit-sqlite.yml | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/workflow-templates/phpunit-mysql.yml b/workflow-templates/phpunit-mysql.yml index 251e9982..8de46aa9 100644 --- a/workflow-templates/phpunit-mysql.yml +++ b/workflow-templates/phpunit-mysql.yml @@ -88,15 +88,15 @@ jobs: working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} - - name: Check file existence - id: check_files + - name: Check integration file existence + id: check_files_integration uses: andstor/file-existence-action@v1 with: files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }} - name: PHPUnit integration # Only run if phpunit integration config file exists - if: steps.check_files.outputs.files_exists == 'true' + if: steps.check_files_integration.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} diff --git a/workflow-templates/phpunit-oci.yml b/workflow-templates/phpunit-oci.yml index 56eaf0bb..acad23c0 100644 --- a/workflow-templates/phpunit-oci.yml +++ b/workflow-templates/phpunit-oci.yml @@ -80,15 +80,15 @@ jobs: working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} - - name: Check file existence - id: check_files + - name: Check integration file existence + id: check_files_integration uses: andstor/file-existence-action@v1 with: files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }} - name: PHPUnit integration # Only run if phpunit integration config file exists - if: steps.check_files.outputs.files_exists == 'true' + if: steps.check_files_integration.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} diff --git a/workflow-templates/phpunit-pgsql.yml b/workflow-templates/phpunit-pgsql.yml index 409b24c2..513a1271 100644 --- a/workflow-templates/phpunit-pgsql.yml +++ b/workflow-templates/phpunit-pgsql.yml @@ -85,15 +85,15 @@ jobs: working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} - - name: Check file existence - id: check_files + - name: Check integration file existence + id: check_files_integration uses: andstor/file-existence-action@v1 with: files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }} - name: PHPUnit integration # Only run if phpunit integration config file exists - if: steps.check_files.outputs.files_exists == 'true' + if: steps.check_files_integration.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} diff --git a/workflow-templates/phpunit-sqlite.yml b/workflow-templates/phpunit-sqlite.yml index ad819112..2c8979c2 100644 --- a/workflow-templates/phpunit-sqlite.yml +++ b/workflow-templates/phpunit-sqlite.yml @@ -74,15 +74,15 @@ jobs: working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} - - name: Check file existence - id: check_files + - name: Check integration file existence + id: check_files_integration uses: andstor/file-existence-action@v1 with: files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }} - name: PHPUnit integration # Only run if phpunit integration config file exists - if: steps.check_files.outputs.files_exists == 'true' + if: steps.check_files_integration.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} From a8eca1e854dd1b305758d20f9feeb4c01dec5c81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 5 Apr 2022 09:07:20 +0200 Subject: [PATCH 5/8] Rename steps and fix paths MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- workflow-templates/phpunit-mysql.yml | 16 ++++++++-------- workflow-templates/phpunit-oci.yml | 16 ++++++++-------- workflow-templates/phpunit-pgsql.yml | 16 ++++++++-------- workflow-templates/phpunit-sqlite.yml | 16 ++++++++-------- 4 files changed, 32 insertions(+), 32 deletions(-) diff --git a/workflow-templates/phpunit-mysql.yml b/workflow-templates/phpunit-mysql.yml index 8de46aa9..4531215d 100644 --- a/workflow-templates/phpunit-mysql.yml +++ b/workflow-templates/phpunit-mysql.yml @@ -76,27 +76,27 @@ jobs: ./occ app:enable --force ${{ env.APP_NAME }} php -S localhost:8080 & - - name: Check file existence - id: check_files + - name: Check PHPUnit config file existence + id: check_phpunit uses: andstor/file-existence-action@v1 with: - files: ${{ env.PHPUNIT_CONFIG }} + files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_CONFIG }} - name: PHPUnit # Only run if phpunit config file exists - if: steps.check_files.outputs.files_exists == 'true' + if: steps.check_phpunit.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} - - name: Check integration file existence - id: check_files_integration + - name: Check PHPUnit integration config file existence + id: check_integration uses: andstor/file-existence-action@v1 with: - files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }} + files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_INTEGRATION_CONFIG }} - name: PHPUnit integration # Only run if phpunit integration config file exists - if: steps.check_files_integration.outputs.files_exists == 'true' + if: steps.check_integration.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} diff --git a/workflow-templates/phpunit-oci.yml b/workflow-templates/phpunit-oci.yml index acad23c0..390c50e6 100644 --- a/workflow-templates/phpunit-oci.yml +++ b/workflow-templates/phpunit-oci.yml @@ -68,27 +68,27 @@ jobs: ./occ app:enable --force ${{ env.APP_NAME }} php -S localhost:8080 & - - name: Check file existence - id: check_files + - name: Check PHPUnit config file existence + id: check_phpunit uses: andstor/file-existence-action@v1 with: - files: ${{ env.PHPUNIT_CONFIG }} + files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_CONFIG }} - name: PHPUnit # Only run if phpunit config file exists - if: steps.check_files.outputs.files_exists == 'true' + if: steps.check_phpunit.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} - - name: Check integration file existence - id: check_files_integration + - name: Check PHPUnit integration config file existence + id: check_integration uses: andstor/file-existence-action@v1 with: - files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }} + files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_INTEGRATION_CONFIG }} - name: PHPUnit integration # Only run if phpunit integration config file exists - if: steps.check_files_integration.outputs.files_exists == 'true' + if: steps.check_integration.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} diff --git a/workflow-templates/phpunit-pgsql.yml b/workflow-templates/phpunit-pgsql.yml index 513a1271..09894e44 100644 --- a/workflow-templates/phpunit-pgsql.yml +++ b/workflow-templates/phpunit-pgsql.yml @@ -73,27 +73,27 @@ jobs: ./occ app:enable --force ${{ env.APP_NAME }} php -S localhost:8080 & - - name: Check file existence - id: check_files + - name: Check PHPUnit config file existence + id: check_phpunit uses: andstor/file-existence-action@v1 with: - files: ${{ env.PHPUNIT_CONFIG }} + files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_CONFIG }} - name: PHPUnit # Only run if phpunit config file exists - if: steps.check_files.outputs.files_exists == 'true' + if: steps.check_phpunit.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} - - name: Check integration file existence - id: check_files_integration + - name: Check PHPUnit integration config file existence + id: check_integration uses: andstor/file-existence-action@v1 with: - files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }} + files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_INTEGRATION_CONFIG }} - name: PHPUnit integration # Only run if phpunit integration config file exists - if: steps.check_files_integration.outputs.files_exists == 'true' + if: steps.check_integration.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} diff --git a/workflow-templates/phpunit-sqlite.yml b/workflow-templates/phpunit-sqlite.yml index 2c8979c2..5992ce20 100644 --- a/workflow-templates/phpunit-sqlite.yml +++ b/workflow-templates/phpunit-sqlite.yml @@ -62,27 +62,27 @@ jobs: ./occ app:enable --force ${{ env.APP_NAME }} php -S localhost:8080 & - - name: Check file existence - id: check_files + - name: Check PHPUnit config file existence + id: check_phpunit uses: andstor/file-existence-action@v1 with: - files: ${{ env.PHPUNIT_CONFIG }} + files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_CONFIG }} - name: PHPUnit # Only run if phpunit config file exists - if: steps.check_files.outputs.files_exists == 'true' + if: steps.check_phpunit.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_CONFIG }} - - name: Check integration file existence - id: check_files_integration + - name: Check PHPUnit integration config file existence + id: check_integration uses: andstor/file-existence-action@v1 with: - files: ${{ env.PHPUNIT_INTEGRATION_CONFIG }} + files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_INTEGRATION_CONFIG }} - name: PHPUnit integration # Only run if phpunit integration config file exists - if: steps.check_files_integration.outputs.files_exists == 'true' + if: steps.check_integration.outputs.files_exists == 'true' working-directory: apps/${{ env.APP_NAME }} run: ./vendor/phpunit/phpunit/phpunit -c ${{ env.PHPUNIT_INTEGRATION_CONFIG }} From 0c7c2234fe01eed15ebf985877dda81ae9facf95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 5 Apr 2022 09:20:04 +0200 Subject: [PATCH 6/8] Remove fail-fast disabling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- workflow-templates/phpunit-mysql.yml | 2 -- workflow-templates/phpunit-oci.yml | 2 -- workflow-templates/phpunit-pgsql.yml | 2 -- workflow-templates/phpunit-sqlite.yml | 2 -- 4 files changed, 8 deletions(-) diff --git a/workflow-templates/phpunit-mysql.yml b/workflow-templates/phpunit-mysql.yml index 4531215d..0e6a1531 100644 --- a/workflow-templates/phpunit-mysql.yml +++ b/workflow-templates/phpunit-mysql.yml @@ -17,8 +17,6 @@ jobs: runs-on: ubuntu-latest strategy: - # do not stop on another job's failure - fail-fast: false matrix: php-versions: ['7.4', '8.0', '8.1'] server-versions: ['master'] diff --git a/workflow-templates/phpunit-oci.yml b/workflow-templates/phpunit-oci.yml index 390c50e6..de0f1248 100644 --- a/workflow-templates/phpunit-oci.yml +++ b/workflow-templates/phpunit-oci.yml @@ -17,8 +17,6 @@ jobs: runs-on: ubuntu-20.04 strategy: - # do not stop on another job's failure - fail-fast: false matrix: php-versions: ['8.0'] server-versions: ['master'] diff --git a/workflow-templates/phpunit-pgsql.yml b/workflow-templates/phpunit-pgsql.yml index 09894e44..969ba49c 100644 --- a/workflow-templates/phpunit-pgsql.yml +++ b/workflow-templates/phpunit-pgsql.yml @@ -17,8 +17,6 @@ jobs: runs-on: ubuntu-latest strategy: - # do not stop on another job's failure - fail-fast: false matrix: php-versions: ['8.0'] server-versions: ['master'] diff --git a/workflow-templates/phpunit-sqlite.yml b/workflow-templates/phpunit-sqlite.yml index 5992ce20..09065021 100644 --- a/workflow-templates/phpunit-sqlite.yml +++ b/workflow-templates/phpunit-sqlite.yml @@ -17,8 +17,6 @@ jobs: runs-on: ubuntu-latest strategy: - # do not stop on another job's failure - fail-fast: false matrix: php-versions: ['8.0'] server-versions: ['master'] From 28ec8ee07b7e4cc31736327e33bb0dce5e5cfc51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 5 Apr 2022 09:21:54 +0200 Subject: [PATCH 7/8] Remove --force option of app:enable command in phpunit workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- workflow-templates/phpunit-mysql.yml | 2 +- workflow-templates/phpunit-oci.yml | 2 +- workflow-templates/phpunit-pgsql.yml | 2 +- workflow-templates/phpunit-sqlite.yml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/workflow-templates/phpunit-mysql.yml b/workflow-templates/phpunit-mysql.yml index 0e6a1531..84790346 100644 --- a/workflow-templates/phpunit-mysql.yml +++ b/workflow-templates/phpunit-mysql.yml @@ -71,7 +71,7 @@ jobs: run: | mkdir data ./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password - ./occ app:enable --force ${{ env.APP_NAME }} + ./occ app:enable ${{ env.APP_NAME }} php -S localhost:8080 & - name: Check PHPUnit config file existence diff --git a/workflow-templates/phpunit-oci.yml b/workflow-templates/phpunit-oci.yml index de0f1248..8b1b917d 100644 --- a/workflow-templates/phpunit-oci.yml +++ b/workflow-templates/phpunit-oci.yml @@ -63,7 +63,7 @@ jobs: run: | mkdir data ./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin - ./occ app:enable --force ${{ env.APP_NAME }} + ./occ app:enable ${{ env.APP_NAME }} php -S localhost:8080 & - name: Check PHPUnit config file existence diff --git a/workflow-templates/phpunit-pgsql.yml b/workflow-templates/phpunit-pgsql.yml index 969ba49c..685482da 100644 --- a/workflow-templates/phpunit-pgsql.yml +++ b/workflow-templates/phpunit-pgsql.yml @@ -68,7 +68,7 @@ jobs: run: | mkdir data ./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password - ./occ app:enable --force ${{ env.APP_NAME }} + ./occ app:enable ${{ env.APP_NAME }} php -S localhost:8080 & - name: Check PHPUnit config file existence diff --git a/workflow-templates/phpunit-sqlite.yml b/workflow-templates/phpunit-sqlite.yml index 09065021..546f4626 100644 --- a/workflow-templates/phpunit-sqlite.yml +++ b/workflow-templates/phpunit-sqlite.yml @@ -57,7 +57,7 @@ jobs: run: | mkdir data ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password - ./occ app:enable --force ${{ env.APP_NAME }} + ./occ app:enable ${{ env.APP_NAME }} php -S localhost:8080 & - name: Check PHPUnit config file existence From a4f496b1d163662e4873eb32eeb06094eda4d058 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Tue, 5 Apr 2022 10:44:30 +0200 Subject: [PATCH 8/8] Only run nextcloud for integration tests MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- workflow-templates/phpunit-mysql.yml | 6 +++++- workflow-templates/phpunit-oci.yml | 6 +++++- workflow-templates/phpunit-pgsql.yml | 6 +++++- workflow-templates/phpunit-sqlite.yml | 6 +++++- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/workflow-templates/phpunit-mysql.yml b/workflow-templates/phpunit-mysql.yml index 84790346..d209ea95 100644 --- a/workflow-templates/phpunit-mysql.yml +++ b/workflow-templates/phpunit-mysql.yml @@ -72,7 +72,6 @@ jobs: mkdir data ./occ maintenance:install --verbose --database=mysql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password ./occ app:enable ${{ env.APP_NAME }} - php -S localhost:8080 & - name: Check PHPUnit config file existence id: check_phpunit @@ -92,6 +91,11 @@ jobs: with: files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_INTEGRATION_CONFIG }} + - name: Run Nextcloud + # Only run if phpunit integration config file exists + if: steps.check_integration.outputs.files_exists == 'true' + run: php -S localhost:8080 & + - name: PHPUnit integration # Only run if phpunit integration config file exists if: steps.check_integration.outputs.files_exists == 'true' diff --git a/workflow-templates/phpunit-oci.yml b/workflow-templates/phpunit-oci.yml index 8b1b917d..87297e16 100644 --- a/workflow-templates/phpunit-oci.yml +++ b/workflow-templates/phpunit-oci.yml @@ -64,7 +64,6 @@ jobs: mkdir data ./occ maintenance:install --verbose --database=oci --database-name=XE --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=autotest --database-pass=owncloud --admin-user admin --admin-pass admin ./occ app:enable ${{ env.APP_NAME }} - php -S localhost:8080 & - name: Check PHPUnit config file existence id: check_phpunit @@ -84,6 +83,11 @@ jobs: with: files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_INTEGRATION_CONFIG }} + - name: Run Nextcloud + # Only run if phpunit integration config file exists + if: steps.check_integration.outputs.files_exists == 'true' + run: php -S localhost:8080 & + - name: PHPUnit integration # Only run if phpunit integration config file exists if: steps.check_integration.outputs.files_exists == 'true' diff --git a/workflow-templates/phpunit-pgsql.yml b/workflow-templates/phpunit-pgsql.yml index 685482da..5d6eca96 100644 --- a/workflow-templates/phpunit-pgsql.yml +++ b/workflow-templates/phpunit-pgsql.yml @@ -69,7 +69,6 @@ jobs: mkdir data ./occ maintenance:install --verbose --database=pgsql --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password ./occ app:enable ${{ env.APP_NAME }} - php -S localhost:8080 & - name: Check PHPUnit config file existence id: check_phpunit @@ -89,6 +88,11 @@ jobs: with: files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_INTEGRATION_CONFIG }} + - name: Run Nextcloud + # Only run if phpunit integration config file exists + if: steps.check_integration.outputs.files_exists == 'true' + run: php -S localhost:8080 & + - name: PHPUnit integration # Only run if phpunit integration config file exists if: steps.check_integration.outputs.files_exists == 'true' diff --git a/workflow-templates/phpunit-sqlite.yml b/workflow-templates/phpunit-sqlite.yml index 546f4626..649d6e2d 100644 --- a/workflow-templates/phpunit-sqlite.yml +++ b/workflow-templates/phpunit-sqlite.yml @@ -58,7 +58,6 @@ jobs: mkdir data ./occ maintenance:install --verbose --database=sqlite --database-name=nextcloud --database-host=127.0.0.1 --database-port=$DB_PORT --database-user=root --database-pass=rootpassword --admin-user admin --admin-pass password ./occ app:enable ${{ env.APP_NAME }} - php -S localhost:8080 & - name: Check PHPUnit config file existence id: check_phpunit @@ -78,6 +77,11 @@ jobs: with: files: apps/${{ env.APP_NAME }}/${{ env.PHPUNIT_INTEGRATION_CONFIG }} + - name: Run Nextcloud + # Only run if phpunit integration config file exists + if: steps.check_integration.outputs.files_exists == 'true' + run: php -S localhost:8080 & + - name: PHPUnit integration # Only run if phpunit integration config file exists if: steps.check_integration.outputs.files_exists == 'true'