From d2f4f5c6fce8dcef65543faf0e31793f11a05f18 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Wed, 20 Jul 2022 15:23:26 -0300 Subject: [PATCH 01/10] Update codesniffer. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 16677e2..808549c 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ }, "require-dev": { "phpunit/phpunit": "^6", - "squizlabs/php_codesniffer": "2.7.1", + "squizlabs/php_codesniffer": "^2.8.1", "drupal/coder": "*", "sebastian/phpcpd": "*" }, From 59b41cbcbc145cf6da45cd71137989d7730017ba Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Wed, 20 Jul 2022 20:35:14 -0300 Subject: [PATCH 02/10] Update testing matrix. --- .github/workflows/build-2.x.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-2.x.yml b/.github/workflows/build-2.x.yml index 825c3ab..19f6659 100644 --- a/.github/workflows/build-2.x.yml +++ b/.github/workflows/build-2.x.yml @@ -19,14 +19,15 @@ jobs: build: # The type of runner that the job will run on runs-on: ubuntu-latest + continue-on-error: true strategy: matrix: - php-versions: ["7.4"] - drupal-version: ["8.9.11", "9.1.5"] + php-versions: ["7.4", "8.0", "8.1"] + drupal-version: ["9.3.x", "9.4.x", "9.5.x-dev"] services: mysql: - image: mysql:5.7 + image: mysql:8.0 env: MYSQL_ALLOW_EMPTY_PASSWORD: yes MYSQL_DATABASE: drupal From 7e22cc85a6afa11632f3b1938f9e8fb980261201 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Thu, 21 Jul 2022 13:01:50 -0300 Subject: [PATCH 03/10] Update to use phpunit tests. --- .github/workflows/build-2.x.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-2.x.yml b/.github/workflows/build-2.x.yml index 825c3ab..25449d7 100644 --- a/.github/workflows/build-2.x.yml +++ b/.github/workflows/build-2.x.yml @@ -23,6 +23,7 @@ jobs: matrix: php-versions: ["7.4"] drupal-version: ["8.9.11", "9.1.5"] + test-suite: ["kernel"] services: mysql: @@ -105,4 +106,4 @@ jobs: - name: PHP tests run: | cd $DRUPAL_DIR/web/core - php scripts/run-tests.sh --suppress-deprecations --url http://127.0.0.1:8282 --verbose --php `which php` --module "controlled_access_terms" + $DRUPAL_DIR/vendor/bin/phpunit --verbose --testsuite "${{ matrix.test-suite }}" From 06ac53db2e9142b701e64a39bd4e3ef3f31ab505 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Thu, 21 Jul 2022 15:05:36 -0300 Subject: [PATCH 04/10] Specify enough in phpunit test. --- .github/workflows/build-2.x.yml | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-2.x.yml b/.github/workflows/build-2.x.yml index 11571d4..59aae27 100644 --- a/.github/workflows/build-2.x.yml +++ b/.github/workflows/build-2.x.yml @@ -25,6 +25,12 @@ jobs: test-suite: ["kernel"] php-versions: ["7.4", "8.0", "8.1"] drupal-version: ["9.3.x", "9.4.x", "9.5.x-dev"] + name: PHP ${{ matrix.php-versions }} | drupal ${{ matrix.drupal-version }} + env: + DRUPAL_VERSION: ${{ matrix.drupal-version }} + SCRIPT_DIR: $GITHUB_WORKSPACE/islandora_ci + DRUPAL_DIR: /opt/drupal + DRUPAL_EXTENSION_NAME: controlled_access_terms services: mysql: @@ -68,12 +74,6 @@ jobs: sudo apt-get remove -y mysql-client mysql-common sudo apt-get install -y mysql-client - - name: Set environment variables - run: | - echo "DRUPAL_VERSION=${{ matrix.drupal-version }}" >> $GITHUB_ENV - echo "SCRIPT_DIR=$GITHUB_WORKSPACE/islandora_ci" >> $GITHUB_ENV - echo "DRUPAL_DIR=/opt/drupal" >> $GITHUB_ENV - - name: Cache Composer dependencies uses: actions/cache@v2 with: @@ -100,11 +100,15 @@ jobs: run: | cd $DRUPAL_DIR/web drush --uri=127.0.0.1:8282 en -y controlled_access_terms - + - name: Test scripts run: $SCRIPT_DIR/travis_scripts.sh - - name: PHP tests + - name: PHPUnit + working-directory: ${{ env.DRUPAL_DIR }} + env: + SIMPLETEST_BASE_URL: http://127.0.0.1:8282 + SIMPLETEST_DB: mysql://drupal:drupal@127.0.0.1/drupal + BROWSERTEST_OUTPUT_DIRECTORY: /opt/drupal/web/sites/simpletest/browser_output run: | - cd $DRUPAL_DIR/web/core - $DRUPAL_DIR/vendor/bin/phpunit --verbose --testsuite "${{ matrix.test-suite }}" + $DRUPAL_DIR/vendor/bin/phpunit "--bootstrap=$DRUPAL_WEB_ROOT/core/tests/bootstrap.php" --group $DRUPAL_EXTENSION_NAME --verbose "$GITHUB_WORKSPACE" From 570548f90d92e57f9de3827a743092200d28b580 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Thu, 21 Jul 2022 15:15:39 -0300 Subject: [PATCH 05/10] Fix broken script directory. --- .github/workflows/build-2.x.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-2.x.yml b/.github/workflows/build-2.x.yml index 59aae27..7e71f6c 100644 --- a/.github/workflows/build-2.x.yml +++ b/.github/workflows/build-2.x.yml @@ -19,7 +19,7 @@ jobs: build: # The type of runner that the job will run on runs-on: ubuntu-latest - continue-on-error: true + fail-fast: false strategy: matrix: test-suite: ["kernel"] @@ -28,7 +28,7 @@ jobs: name: PHP ${{ matrix.php-versions }} | drupal ${{ matrix.drupal-version }} env: DRUPAL_VERSION: ${{ matrix.drupal-version }} - SCRIPT_DIR: $GITHUB_WORKSPACE/islandora_ci + SCRIPT_DIR: ${{ github.workspace }}/islandora_ci DRUPAL_DIR: /opt/drupal DRUPAL_EXTENSION_NAME: controlled_access_terms @@ -100,7 +100,7 @@ jobs: run: | cd $DRUPAL_DIR/web drush --uri=127.0.0.1:8282 en -y controlled_access_terms - + - name: Test scripts run: $SCRIPT_DIR/travis_scripts.sh From 9b82e5e0e6f5520eb869ccec49138353f8c395e7 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Thu, 21 Jul 2022 16:18:50 -0300 Subject: [PATCH 06/10] fail fast. --- .github/workflows/build-2.x.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-2.x.yml b/.github/workflows/build-2.x.yml index 7e71f6c..4bfc798 100644 --- a/.github/workflows/build-2.x.yml +++ b/.github/workflows/build-2.x.yml @@ -19,8 +19,8 @@ jobs: build: # The type of runner that the job will run on runs-on: ubuntu-latest - fail-fast: false strategy: + fail-fast: false matrix: test-suite: ["kernel"] php-versions: ["7.4", "8.0", "8.1"] From 0860d91f3c97209535e23f746b3e95bdf25bd4dc Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Thu, 21 Jul 2022 16:25:39 -0300 Subject: [PATCH 07/10] Update build-2.x.yml --- .github/workflows/build-2.x.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-2.x.yml b/.github/workflows/build-2.x.yml index 4bfc798..feb5a6a 100644 --- a/.github/workflows/build-2.x.yml +++ b/.github/workflows/build-2.x.yml @@ -30,6 +30,7 @@ jobs: DRUPAL_VERSION: ${{ matrix.drupal-version }} SCRIPT_DIR: ${{ github.workspace }}/islandora_ci DRUPAL_DIR: /opt/drupal + DRUPAL_WEB_ROOT: /opt/drupal/web DRUPAL_EXTENSION_NAME: controlled_access_terms services: From faad754d0964b27b81fee0c841ac6ac22617e09a Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Thu, 21 Jul 2022 16:56:52 -0300 Subject: [PATCH 08/10] Deprecate D8 --- composer.json | 3 ++- controlled_access_terms.info.yml | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 16677e2..debaad9 100644 --- a/composer.json +++ b/composer.json @@ -28,7 +28,8 @@ "drupal/name": "Provides western-centric structured names." }, "conflict": { - "islandora/jsonld": "<2.1.0" + "islandora/jsonld": "<2.1.0", + "drupal/core": "<=8" }, "license": "GPL-2.0-or-later", "authors": [ diff --git a/controlled_access_terms.info.yml b/controlled_access_terms.info.yml index e8b1b14..de0df22 100644 --- a/controlled_access_terms.info.yml +++ b/controlled_access_terms.info.yml @@ -1,8 +1,7 @@ name: 'Controlled Access Terms' type: module description: 'Provides topic, geographic, person, family, and corporate body entites as well as an authorities link field.' -core: 8.x -core_version_requirement: ^8 || ^9 +core_version_requirement: ^9 package: 'Controlled Access Terms' dependencies: From 83d293ec773849dda5d4e55e40854a25af68eba0 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Wed, 20 Jul 2022 15:23:26 -0300 Subject: [PATCH 09/10] Update codesniffer. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index debaad9..d16d288 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ }, "require-dev": { "phpunit/phpunit": "^6", - "squizlabs/php_codesniffer": "2.7.1", + "squizlabs/php_codesniffer": "^2.8.1", "drupal/coder": "*", "sebastian/phpcpd": "*" }, From c3b1131d59a6c144bfc173059c4c10c4e41e9bdc Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Wed, 24 Aug 2022 15:14:03 -0300 Subject: [PATCH 10/10] Allow phpcs 2 or 3. --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d16d288..4a2b549 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,7 @@ }, "require-dev": { "phpunit/phpunit": "^6", - "squizlabs/php_codesniffer": "^2.8.1", + "squizlabs/php_codesniffer": "^2.8.1 || ^3", "drupal/coder": "*", "sebastian/phpcpd": "*" },