diff --git a/.github/workflows/next-drupal-query.yml b/.github/workflows/next-drupal-query.yml index 5ebe1ccd..0e5515c5 100644 --- a/.github/workflows/next-drupal-query.yml +++ b/.github/workflows/next-drupal-query.yml @@ -8,7 +8,7 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Install modules run: yarn - name: Run tests diff --git a/.github/workflows/next-drupal.yml b/.github/workflows/next-drupal.yml index f34d98c0..477cd61e 100644 --- a/.github/workflows/next-drupal.yml +++ b/.github/workflows/next-drupal.yml @@ -7,7 +7,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: ref: ${{github.event.pull_request.head.ref}} repository: ${{github.event.pull_request.head.repo.full_name}} diff --git a/.github/workflows/next.yml b/.github/workflows/next.yml index 2b8b840a..fdfb3c8b 100644 --- a/.github/workflows/next.yml +++ b/.github/workflows/next.yml @@ -10,11 +10,15 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - php: ["8.0", "8.1"] - drupal: ["9.4", "9.5", "10.0"] + # Supported PHP versions: https://www.drupal.org/docs/getting-started/system-requirements/php-requirements + php: ["8.0", "8.1", "8.2"] + # Supported Drupal versions: https://www.drupal.org/project/drupal + drupal: ["9.5", "10.0"] exclude: - - php: "8.0" - drupal: "10.0" + - drupal: "9.5" + php: "8.2" + - drupal: "10.0" + php: "8.0" name: Drupal ${{ matrix.drupal }} - PHP ${{ matrix.php }} services: mysql: @@ -26,7 +30,7 @@ jobs: - 3306 options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - uses: shivammathur/setup-php@v2 with: php-version: ${{ matrix.php }} @@ -37,17 +41,17 @@ jobs: id: composercache run: | cd modules/next - echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v2 + echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT" + - uses: actions/cache@v3 with: path: ${{ steps.composercache.outputs.dir }} key: ${{ runner.os }}-${{ matrix.drupal }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer- + restore-keys: ${{ runner.os }}-${{ matrix.drupal }}-composer- - name: Setup problem matchers for PHPUnit run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - name: Setup Drupal run: | - COMPOSER_MEMORY_LIMIT=-1 composer create-project drupal/recommended-project:${{ matrix.drupal }} ~/drupal --no-interaction --no-install + COMPOSER_MEMORY_LIMIT=-1 composer create-project drupal/recommended-project:${{ matrix.drupal }}.x ~/drupal --no-interaction --no-install cd ~/drupal composer config extra.enable-patching true composer config extra.compile-mode all @@ -57,7 +61,7 @@ jobs: composer config repositories.0 path $GITHUB_WORKSPACE composer config repositories.1 composer https://packages.drupal.org/8 composer config allow-plugins true -n - COMPOSER_MEMORY_LIMIT=-1 composer require drupal/core-dev:${{ matrix.drupal }} --no-suggest --no-install + COMPOSER_MEMORY_LIMIT=-1 composer require drupal/core-dev --no-install composer install - name: Add phpspec/prophecy-phpunit run: | diff --git a/.github/workflows/release-pr.yml b/.github/workflows/release-pr.yml index 028ab194..bfbb213d 100644 --- a/.github/workflows/release-pr.yml +++ b/.github/workflows/release-pr.yml @@ -10,7 +10,7 @@ jobs: environment: Preview steps: - name: Init - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} - name: Setup Node diff --git a/modules/next/.github/workflows/main.yml b/modules/next/.github/workflows/main.yml deleted file mode 100644 index eaa9f81f..00000000 --- a/modules/next/.github/workflows/main.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: Tests -on: - push: - pull_request: - branches: - - 8.x-1.x - -jobs: - phpunit: - runs-on: ubuntu-latest - strategy: - matrix: - include: - - drupal: "^8.9" - name: Drupal ${{ matrix.drupal }} - services: - mysql: - image: mysql:5.7 - env: - MYSQL_ALLOW_EMPTY_PASSWORD: yes - MYSQL_DATABASE: db - ports: - - 3306 - options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 - steps: - - uses: actions/checkout@v2 - - uses: shivammathur/setup-php@v2 - with: - php-version: 7.1 - extensions: dom, curl, libxml, mbstring, zip, pdo, mysql, pdo_mysql, bcmath, soap, intl, gd, exif, iconv - coverage: none - tools: composer:v1 - - name: Get composer cache directory - id: composercache - run: echo "::set-output name=dir::$(composer config cache-files-dir)" - - uses: actions/cache@v2 - with: - path: ${{ steps.composercache.outputs.dir }} - key: ${{ runner.os }}-${{ matrix.drupal }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer- - - name: Setup problem matchers for PHPUnit - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: Setup Drupal - run: | - COMPOSER_MEMORY_LIMIT=-1 composer create-project drupal/recommended-project:${{ matrix.drupal }} ~/drupal --no-interaction - cd ~/drupal - composer config extra.enable-patching true - composer config extra.compile-mode all - composer config minimum-stability dev - composer config prefer-stable true - composer config preferred-install dist - composer config repositories.0 path $GITHUB_WORKSPACE - composer config repositories.1 composer https://packages.drupal.org/8 - COMPOSER_MEMORY_LIMIT=-1 composer require drupal/core-dev:${{ matrix.drupal }} --no-suggest - - name: Copy module - run: cp -R ../next-drupal-module ~/drupal/web/modules/next - - name: Run php built-in server - run: php -S 127.0.0.1:8080 -t ~/drupal/web & - - name: Run PHPUnit - run: | - cd ~/drupal/web - ../vendor/bin/phpunit -c core modules/next - env: - SYMFONY_DEPRECATIONS_HELPER: weak - SIMPLETEST_DB: mysql://root:@127.0.0.1:${{ job.services.mysql.ports[3306] }}/db - SIMPLETEST_BASE_URL: http://127.0.0.1:8080