Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/back-to-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
container:
image: pookmish/drupal8ci:latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Back to Dev
run: |
composer global require su-sws/stanford-caravan:dev-8.x-2.x
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
pr-labeler:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- uses: codelytv/pr-size-labeler@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
28 changes: 18 additions & 10 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,13 @@ concurrency:
jobs:
phpunit:
name: PHPUnit Coverage Tests
strategy:
fail-fast: false
matrix:
php_version: [ 8.3, 8.4, 8.5 ]
runs-on: ubuntu-latest
container:
image: pookmish/drupal8ci:php8.3
image: pookmish/drupal8ci:php${{ matrix.php_version }}
services:
mysql:
image: mysql:8.0
Expand All @@ -21,7 +25,7 @@ jobs:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
path: project
- name: Build project
Expand All @@ -31,16 +35,20 @@ jobs:
composer global require su-sws/stanford-caravan:10.x-dev
~/.config/composer/vendor/bin/sws-caravan phpunit /var/www/html --extension-dir=$GITHUB_WORKSPACE/project --with-coverage
- name: Save Test Results
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: failure()
with:
name: unit-tests-results
path: /var/www/html/artifacts
phpunit_d11:
name: PHPUnit Coverage Tests Drupal 11
strategy:
fail-fast: false
matrix:
php_version: [ 8.3, 8.4, 8.5 ]
runs-on: ubuntu-latest
container:
image: pookmish/drupal8ci:php8.3
image: pookmish/drupal8ci:php${{ matrix.php_version }}
services:
mysql:
image: mysql:8.0
Expand All @@ -53,7 +61,7 @@ jobs:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6
with:
path: project
- name: Build project
Expand All @@ -63,7 +71,7 @@ jobs:
composer global require su-sws/stanford-caravan:11.x-dev
~/.config/composer/vendor/bin/sws-caravan phpunit /var/www/html --extension-dir=$GITHUB_WORKSPACE/project --with-coverage
- name: Save Test Results
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
if: failure()
with:
name: unit-tests-results
Expand Down Expand Up @@ -91,15 +99,15 @@ jobs:
# - 33306:3306
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
# steps:
# - uses: actions/checkout@v4
# - uses: actions/checkout@v6
# with:
# path: project
# - name: Run tests
# run: |
# composer global require su-sws/stanford-caravan:11.x-dev
# ~/.config/composer/vendor/bin/sws-caravan codeception /var/www/html --extension-dir=$GITHUB_WORKSPACE/project --suites=acceptance
# - name: Save Test Results
# uses: actions/upload-artifact@v4
# uses: actions/upload-artifact@v7
# if: always()
# with:
# name: acceptance-tests-results
Expand Down Expand Up @@ -130,15 +138,15 @@ jobs:
# - 33306:3306
# options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
# steps:
# - uses: actions/checkout@v4
# - uses: actions/checkout@v6
# with:
# path: project
# - name: Run tests
# run: |
# composer global require su-sws/stanford-caravan:11.x-dev
# ~/.config/composer/vendor/bin/sws-caravan codeception /var/www/html --extension-dir=$GITHUB_WORKSPACE/project --suites=functional
# - name: Save Test Results
# uses: actions/upload-artifact@v4
# uses: actions/upload-artifact@v7
# if: always()
# with:
# name: functional-tests-results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ class ReactBehaviorsTest extends KernelTestBase {
'system',
'react_paragraphs_behaviors',
'test_react_paragraphs_behaviors',
'paragraphs',
'file',
'user',
];
Expand All @@ -37,6 +36,7 @@ class ReactBehaviorsTest extends KernelTestBase {
*/
public function setup(): void {
parent::setUp();
$this->container->get('module_installer')->install(['paragraphs']);
$this->installEntitySchema('file');
ParagraphsType::create([
'id' => 'card',
Expand Down
2 changes: 1 addition & 1 deletion tests/src/Kernel/Form/ParagraphRowFormTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ abstract class ParagraphRowFormTestBase extends KernelTestBase {
protected static $modules = [
'system',
'react_paragraphs',
'paragraphs',
'file',
'user',
];
Expand All @@ -36,6 +35,7 @@ abstract class ParagraphRowFormTestBase extends KernelTestBase {
*/
public function setup(): void {
parent::setUp();
$this->container->get('module_installer')->install(['paragraphs']);
$this->installEntitySchema('user');
$this->installEntitySchema('paragraph_row');
$this->installEntitySchema('file');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ abstract class ReactParagraphsFieldTestBase extends KernelTestBase {
'system',
'react_paragraphs',
'field',
'paragraphs',
'entity_reference_revisions',
'editor',
'node',
Expand All @@ -53,6 +52,7 @@ abstract class ReactParagraphsFieldTestBase extends KernelTestBase {
*/
public function setup(): void {
parent::setUp();
$this->container->get('module_installer')->install(['paragraphs']);
$this->installEntitySchema('node');
$this->installEntitySchema('user');
$this->installEntitySchema('field_storage_config');
Expand Down
5 changes: 5 additions & 0 deletions tests/src/Unit/Form/ParagraphsRowTypeListBuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Drupal\Tests\react_paragraphs\Unit\Form;

use Drupal\Core\Access\AccessResultInterface;
use Drupal\Core\DependencyInjection\ContainerBuilder;
use Drupal\Core\Entity\EntityInterface;
use Drupal\Core\Entity\EntityStorageInterface;
Expand Down Expand Up @@ -52,9 +53,13 @@ public function setup(): void {
public function testListBuilder() {
$this->assertCount(3, $this->builder->buildHeader());

$access = $this->createMock(AccessResultInterface::class);
$access->method('isAllowed')->willReturn(TRUE);

$entity = $this->createMock(EntityInterface::class);
$entity->method('label')->willReturn('Foo');
$entity->method('id')->willReturn(1);
$entity->method('access')->willReturn($access);

$this->assertCount(3, $this->builder->buildRow($entity));
}
Expand Down
Loading