From da2072cce48eb4517d49961e21990d98cecac569 Mon Sep 17 00:00:00 2001 From: Rosie Le Faive Date: Fri, 28 Jun 2024 12:24:59 -0300 Subject: [PATCH] Drop drupal 10.1 and add drupal 10.4 to the testing matrix. (#78) * Drop drupal 10.1 and add drupal 10.4 to the testing matrix. * Update phpunit configuration schema. * Remove dump() in test. * Update node 16 actions in CI workflow. --- .github/workflows/build-2.x.yml | 111 ---------------- .github/workflows/build-3.x.yml | 11 +- phpunit.xml | 118 +++++++++--------- .../Functional/JsonldContextGeneratorTest.php | 1 - 4 files changed, 63 insertions(+), 178 deletions(-) delete mode 100644 .github/workflows/build-2.x.yml diff --git a/.github/workflows/build-2.x.yml b/.github/workflows/build-2.x.yml deleted file mode 100644 index 7dc4637..0000000 --- a/.github/workflows/build-2.x.yml +++ /dev/null @@ -1,111 +0,0 @@ -# This is a basic workflow to help you get started with Actions - -name: CI - -# Controls when the action will run. -on: - # Triggers the workflow on push or pull request events but only for the 8.x branch - push: - branches: [ 2.x ] - pull_request: - branches: [ 2.x ] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - strategy: - matrix: - php-versions: ["8.0", "8.1"] - drupal-version: ["9.5.x"] - - env: - DRUPAL_VERSION: ${{ matrix.drupal-version }} - SCRIPT_DIR: ${{ github.workspace }}/islandora_ci - DRUPAL_DIR: /opt/drupal - DRUPAL_WEB_ROOT: /opt/drupal/web - PHPUNIT_FILE: ${{ github.workspace }}/build_dir/phpunit.xml - - services: - mysql: - image: mysql:8.0 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: drupal - ports: - - 3306:3306 - activemq: - image: webcenter/activemq:5.14.3 - ports: - - 8161:8161 - - 61616:61616 - - 61613:61613 - - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - name: Checkout code - uses: actions/checkout@v3 - with: - path: build_dir - - - name: Checkout islandora_ci - uses: actions/checkout@v3 - with: - repository: islandora/islandora_ci - ref: github-actions - path: islandora_ci - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - tools: composer:v2 - - - name: Setup Mysql client - run: | - sudo apt-get update - sudo apt-get install -y mysql-client - - - name: Cache Composer dependencies - uses: actions/cache@v3 - with: - path: /tmp/composer-cache - key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} - - - name: Setup Drupal - run: | - mkdir $DRUPAL_DIR - $SCRIPT_DIR/travis_setup_drupal.sh - cd $DRUPAL_DIR - chmod -R u+w web/sites/default - mkdir -p web/sites/simpletest/browser_output - - - name: Setup composer paths - run: | - git -C "$GITHUB_WORKSPACE/build_dir" checkout -b github-testing - cd $DRUPAL_DIR - composer config repositories.local path "$GITHUB_WORKSPACE/build_dir" - composer config minimum-stability dev - composer require "islandora/jsonld:dev-github-testing as dev-2.x" --prefer-source -W - - - name: Install modules - run: | - cd $DRUPAL_DIR/web - drush --uri=127.0.0.1:8282 en -y user jsonld - - - name: Copy PHPunit file - run: cp $PHPUNIT_FILE $DRUPAL_DIR/web/core/phpunit.xml - - - name: Test scripts - run: $SCRIPT_DIR/travis_scripts.sh - - # Unit test config is defined in the module's phpunit.xml file. - - name: PHPUNIT tests - run: | - cd $DRUPAL_DIR/web/core - $DRUPAL_DIR/vendor/bin/phpunit --verbose --debug diff --git a/.github/workflows/build-3.x.yml b/.github/workflows/build-3.x.yml index c2951fe..be82dfd 100644 --- a/.github/workflows/build-3.x.yml +++ b/.github/workflows/build-3.x.yml @@ -22,10 +22,7 @@ jobs: strategy: matrix: php-versions: ["8.1", "8.2", "8.3"] - drupal-version: ["10.1.x", "10.2.x", "10.3.x-dev"] - exclude: - - php-versions: "8.3" - drupal-version: "10.1.x" + drupal-version: ["10.2.x", "10.3.x", "10.4.x-dev"] env: DRUPAL_VERSION: ${{ matrix.drupal-version }} @@ -52,12 +49,12 @@ jobs: steps: # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: build_dir - name: Checkout islandora_ci - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: repository: islandora/islandora_ci ref: github-actions @@ -75,7 +72,7 @@ jobs: sudo apt-get install -y mysql-client - name: Cache Composer dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: /tmp/composer-cache key: ${{ runner.os }}-${{ hashFiles('**/composer.lock') }} diff --git a/phpunit.xml b/phpunit.xml index 5debb88..cf2b36b 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -5,70 +5,70 @@ https://www.drupal.org/node/2116263 for details. --> - - - - - - - - - - - - + + + + + + + + + + - - - - - - - - - - - - - - + + + + + + + + + + + + + + - - ../modules/contrib/jsonld/tests/src/Kernel + + ../modules/contrib/jsonld/tests/src/Kernel + + + ../modules/contrib/jsonld/tests/src/Functional + + - - ../modules/contrib/jsonld/tests/src/Functional + - - - - - - - + + + - - + + - - - - - ./includes - ./lib - ./modules - ../modules - ../sites - - ./modules/*/src/Tests - ./modules/*/tests - ../modules/*/src/Tests - ../modules/*/tests - ../modules/*/*/src/Tests - ../modules/*/*/tests - - - - \ No newline at end of file + + + diff --git a/tests/src/Functional/JsonldContextGeneratorTest.php b/tests/src/Functional/JsonldContextGeneratorTest.php index c14df32..d3f5cae 100644 --- a/tests/src/Functional/JsonldContextGeneratorTest.php +++ b/tests/src/Functional/JsonldContextGeneratorTest.php @@ -121,7 +121,6 @@ public function testJsonldcontextResponseIsValid() { $this->drupalGet($url); $this->assertSession()->statusCodeEquals(200); $jsonldarray = json_decode($this->getSession()->getPage()->getContent(), TRUE); - dump($jsonldarray); $this->assertEquals($expected, $jsonldarray, "Returned @context matches expected response."); }