From 62fae7ecd7c8971fd4c059490c624f9c8c961e55 Mon Sep 17 00:00:00 2001 From: Maxime Rainville Date: Fri, 8 Nov 2024 10:05:22 +1300 Subject: [PATCH] Move test around --- .github/workflows/ci.yml | 45 ++++++++----------- composer.json | 2 +- .../Event/AbstractDataObjectEventTest.php | 0 tests/{ => php}/Event/DataObjectEventTest.php | 0 tests/{ => php}/Event/DataObjectEventTest.yml | 0 .../Event/DataObjectVersionEventTest.php | 0 .../Extension/EventDispatchExtensionTest.php | 0 .../Extension/EventDispatchExtensionTest.yml | 0 tests/{ => php}/Mock/SimpleDataObject.php | 0 tests/{ => php}/Mock/VersionedDataObject.php | 0 tests/{ => php}/Service/EventServiceTest.php | 0 tests/{ => php}/TestListenerLoader.php | 0 12 files changed, 19 insertions(+), 28 deletions(-) rename tests/{ => php}/Event/AbstractDataObjectEventTest.php (100%) rename tests/{ => php}/Event/DataObjectEventTest.php (100%) rename tests/{ => php}/Event/DataObjectEventTest.yml (100%) rename tests/{ => php}/Event/DataObjectVersionEventTest.php (100%) rename tests/{ => php}/Extension/EventDispatchExtensionTest.php (100%) rename tests/{ => php}/Extension/EventDispatchExtensionTest.yml (100%) rename tests/{ => php}/Mock/SimpleDataObject.php (100%) rename tests/{ => php}/Mock/VersionedDataObject.php (100%) rename tests/{ => php}/Service/EventServiceTest.php (100%) rename tests/{ => php}/TestListenerLoader.php (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb97501..3b2065e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,37 +2,28 @@ name: CI on: push: - branches: [ master ] pull_request: - branches: [ master ] workflow_dispatch: jobs: - tests: - name: PHP ${{ matrix.php }} - runs-on: ubuntu-latest - strategy: - matrix: - php: ['8.1', '8.2', '8.3'] - - steps: - - uses: actions/checkout@v3 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - tools: composer:v2 - - - name: Install dependencies - run: composer install --prefer-dist --no-progress - - - name: Run tests - run: vendor/bin/phpunit - - - name: Static Analysis - run: vendor/bin/phpstan analyse + ci: + name: CI + uses: silverstripe/gha-ci/.github/workflows/ci.yml@v1 + with: + dynamic_matrix: false + extra_jobs: | + - php: '8.1' + db: mysql80 + phpunit: true + installer_version: ^4 + - php: '8.2' + db: mysql80 + phpunit: true + installer_version: ^5 + - php: '8.2' + db: mariadb + phpunit: true + installer_version: ^5 coding-standards: name: Coding Standards diff --git a/composer.json b/composer.json index d92c087..be00039 100644 --- a/composer.json +++ b/composer.json @@ -24,7 +24,7 @@ }, "autoload-dev": { "psr-4": { - "ArchiPro\\Silverstripe\\EventDispatcher\\Tests\\": "tests/" + "ArchiPro\\Silverstripe\\EventDispatcher\\Tests\\": "tests/php/" } }, "scripts": { diff --git a/tests/Event/AbstractDataObjectEventTest.php b/tests/php/Event/AbstractDataObjectEventTest.php similarity index 100% rename from tests/Event/AbstractDataObjectEventTest.php rename to tests/php/Event/AbstractDataObjectEventTest.php diff --git a/tests/Event/DataObjectEventTest.php b/tests/php/Event/DataObjectEventTest.php similarity index 100% rename from tests/Event/DataObjectEventTest.php rename to tests/php/Event/DataObjectEventTest.php diff --git a/tests/Event/DataObjectEventTest.yml b/tests/php/Event/DataObjectEventTest.yml similarity index 100% rename from tests/Event/DataObjectEventTest.yml rename to tests/php/Event/DataObjectEventTest.yml diff --git a/tests/Event/DataObjectVersionEventTest.php b/tests/php/Event/DataObjectVersionEventTest.php similarity index 100% rename from tests/Event/DataObjectVersionEventTest.php rename to tests/php/Event/DataObjectVersionEventTest.php diff --git a/tests/Extension/EventDispatchExtensionTest.php b/tests/php/Extension/EventDispatchExtensionTest.php similarity index 100% rename from tests/Extension/EventDispatchExtensionTest.php rename to tests/php/Extension/EventDispatchExtensionTest.php diff --git a/tests/Extension/EventDispatchExtensionTest.yml b/tests/php/Extension/EventDispatchExtensionTest.yml similarity index 100% rename from tests/Extension/EventDispatchExtensionTest.yml rename to tests/php/Extension/EventDispatchExtensionTest.yml diff --git a/tests/Mock/SimpleDataObject.php b/tests/php/Mock/SimpleDataObject.php similarity index 100% rename from tests/Mock/SimpleDataObject.php rename to tests/php/Mock/SimpleDataObject.php diff --git a/tests/Mock/VersionedDataObject.php b/tests/php/Mock/VersionedDataObject.php similarity index 100% rename from tests/Mock/VersionedDataObject.php rename to tests/php/Mock/VersionedDataObject.php diff --git a/tests/Service/EventServiceTest.php b/tests/php/Service/EventServiceTest.php similarity index 100% rename from tests/Service/EventServiceTest.php rename to tests/php/Service/EventServiceTest.php diff --git a/tests/TestListenerLoader.php b/tests/php/TestListenerLoader.php similarity index 100% rename from tests/TestListenerLoader.php rename to tests/php/TestListenerLoader.php