Skip to content

Commit b723ac5

Browse files
authored
ci(next): add Drupal 10.1 to CI test matrix
Fixes #547
1 parent ec2cee0 commit b723ac5

File tree

2 files changed

+15
-19
lines changed

2 files changed

+15
-19
lines changed

.github/workflows/next.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ jobs:
1313
strategy:
1414
matrix:
1515
# Supported PHP versions: https://www.drupal.org/docs/getting-started/system-requirements/php-requirements
16-
php: ["8.0", "8.1", "8.2"]
16+
php: ["8.1", "8.2", "8.3"]
1717
# Supported Drupal versions: https://www.drupal.org/project/drupal
18-
drupal: ["9.5", "10.0"]
18+
drupal: ["10.0", "10.1"]
1919
exclude:
20-
- drupal: "9.5"
21-
php: "8.2"
2220
- drupal: "10.0"
23-
php: "8.0"
21+
php: "8.3"
22+
- drupal: "10.1"
23+
php: "8.3"
2424
name: Drupal ${{ matrix.drupal }} - PHP ${{ matrix.php }}
2525
services:
2626
mysql:
@@ -65,11 +65,6 @@ jobs:
6565
composer config allow-plugins true -n
6666
COMPOSER_MEMORY_LIMIT=-1 composer require drupal/core-dev --no-install
6767
composer install
68-
- name: Add phpspec/prophecy-phpunit
69-
run: |
70-
cd ~/drupal
71-
COMPOSER_MEMORY_LIMIT=-1 composer require --dev phpspec/prophecy-phpunit:^2 -W
72-
if: ${{ startsWith(matrix.drupal, '9') }}
7368
- name: Run phpcs
7469
run: |
7570
~/drupal/vendor/bin/phpcs -p -s --colors --standard=modules/next/phpcs.xml modules/next

modules/next/tests/src/Kernel/Plugin/PathRevalidatorTest.php

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
use Drupal\next\Entity\NextSite;
88
use Drupal\Tests\node\Traits\NodeCreationTrait;
99
use GuzzleHttp\ClientInterface;
10+
use GuzzleHttp\Psr7\Response as GuzzleResponse;
1011
use Prophecy\PhpUnit\ProphecyTrait;
1112
use Symfony\Component\HttpFoundation\Request;
1213
use Symfony\Component\HttpFoundation\Response;
@@ -84,7 +85,7 @@ public function testRevalidate() {
8485
$page->save();
8586
$this->container->get('kernel')->terminate(Request::create('/'), new Response());
8687

87-
$client->request('GET', 'http://blog.com/api/revalidate?slug=/node/2')->shouldBeCalled();
88+
$client->request('GET', 'http://blog.com/api/revalidate?slug=/node/2')->shouldBeCalled()->willReturn(new GuzzleResponse());
8889
$blog_site->setRevalidateUrl('http://blog.com/api/revalidate')->save();
8990
$page = $this->createNode();
9091
$page->save();
@@ -103,8 +104,8 @@ public function testRevalidate() {
103104
],
104105
])->save();
105106

106-
$client->request('GET', 'http://marketing.com/api/revalidate?slug=/node/3&secret=12345')->shouldBeCalled();
107-
$client->request('GET', 'http://blog.com/api/revalidate?slug=/node/3')->shouldBeCalled();
107+
$client->request('GET', 'http://marketing.com/api/revalidate?slug=/node/3&secret=12345')->shouldBeCalled()->willReturn(new GuzzleResponse());
108+
$client->request('GET', 'http://blog.com/api/revalidate?slug=/node/3')->shouldBeCalled()->willReturn(new GuzzleResponse());
108109
$page = $this->createNode();
109110
$page->save();
110111
$this->container->get('kernel')->terminate(Request::create('/'), new Response());
@@ -113,12 +114,12 @@ public function testRevalidate() {
113114
'additional_paths' => "/\n/blog",
114115
])->save();
115116

116-
$client->request('GET', 'http://marketing.com/api/revalidate?slug=/node/3&secret=12345')->shouldBeCalled();
117-
$client->request('GET', 'http://marketing.com/api/revalidate?slug=/&secret=12345')->shouldBeCalled();
118-
$client->request('GET', 'http://marketing.com/api/revalidate?slug=/blog&secret=12345')->shouldBeCalled();
119-
$client->request('GET', 'http://blog.com/api/revalidate?slug=/node/3')->shouldBeCalled();
120-
$client->request('GET', 'http://blog.com/api/revalidate?slug=/')->shouldBeCalled();
121-
$client->request('GET', 'http://blog.com/api/revalidate?slug=/blog')->shouldBeCalled();
117+
$client->request('GET', 'http://marketing.com/api/revalidate?slug=/node/3&secret=12345')->shouldBeCalled()->willReturn(new GuzzleResponse());
118+
$client->request('GET', 'http://marketing.com/api/revalidate?slug=/&secret=12345')->shouldBeCalled()->willReturn(new GuzzleResponse());
119+
$client->request('GET', 'http://marketing.com/api/revalidate?slug=/blog&secret=12345')->shouldBeCalled()->willReturn(new GuzzleResponse());
120+
$client->request('GET', 'http://blog.com/api/revalidate?slug=/node/3')->shouldBeCalled()->willReturn(new GuzzleResponse());
121+
$client->request('GET', 'http://blog.com/api/revalidate?slug=/')->shouldBeCalled()->willReturn(new GuzzleResponse());
122+
$client->request('GET', 'http://blog.com/api/revalidate?slug=/blog')->shouldBeCalled()->willReturn(new GuzzleResponse());
122123
$page = $this->createNode();
123124
$page->save();
124125
$this->container->get('kernel')->terminate(Request::create('/'), new Response());

0 commit comments

Comments
 (0)