Skip to content

Commit

Permalink
EWPP-4991: Run tests in separate suites.
Browse files Browse the repository at this point in the history
  • Loading branch information
ademarco committed Jan 23, 2025
1 parent 5175134 commit 6acf1ec
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 29 deletions.
73 changes: 46 additions & 27 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
php_version: ["8.1", "8.3"]
php_version: ["8.3"]
composer_command: ["composer install"]
env:
PHP_VERSION: ${{ matrix.php_version }}
Expand All @@ -25,30 +25,49 @@ jobs:
- name: Build dependencies
run: docker-compose exec -T php ${{ matrix.composer_command }}

- name: Run tests
run: docker-compose exec -T php ./vendor/bin/phpunit
# - name: Run tests
# run: docker-compose exec -T php ./vendor/bin/phpunit
# While porting to 3.x run each test suite separately.
# We will remove this one the job is done.
- name: Authentication
run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite Authentication"
- name: CodeGenerator
run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite CodeGenerator"
- name: ExtSoapEngine
run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite ExtSoapEngine"
- name: Notification
run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite Notification"
- name: Request
run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite Request"
- name: TicketValidation
run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite TicketValidation"
- name: RequestClientFactoryTest
run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite RequestClientFactoryTest"
- name: SerializerTest
run: "docker-compose exec -T php ./vendor/bin/phpunit --testsuite SerializerTest"

code-sniffer:
runs-on: ubuntu-latest
strategy:
matrix:
php_version: ["8.1", "8.3"]
env:
PHP_VERSION: ${{ matrix.php_version }}
steps:
- name: Clone repository
uses: actions/checkout@v2

- name: Install Docker Compose
run: |
sudo apt-get update
sudo apt-get install -y docker-compose
- name: Start services with Docker Compose
run: docker-compose up -d

- name: Install dependencies
run: docker-compose exec -T php composer install

- name: Run code sniffer
run: docker-compose exec -T php ./vendor/bin/grumphp run
# We will run codesniffer at the end of our refactoring effort.
# code-sniffer:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# php_version: ["8.3"]
# env:
# PHP_VERSION: ${{ matrix.php_version }}
# steps:
# - name: Clone repository
# uses: actions/checkout@v2
#
# - name: Install Docker Compose
# run: |
# sudo apt-get update
# sudo apt-get install -y docker-compose
#
# - name: Start services with Docker Compose
# run: docker-compose up -d
#
# - name: Install dependencies
# run: docker-compose exec -T php composer install
#
# - name: Run code sniffer
# run: docker-compose exec -T php ./vendor/bin/grumphp run
25 changes: 23 additions & 2 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,29 @@
<env name="SYMFONY_DEPRECATIONS_HELPER" value="disabled" />
</php>
<testsuites>
<testsuite name="unit">
<directory>./tests/</directory>
<testsuite name="Authentication">
<directory>tests/Authentication</directory>
</testsuite>
<testsuite name="CodeGenerator">
<directory>tests/CodeGenerator</directory>
</testsuite>
<testsuite name="ExtSoapEngine">
<directory>tests/ExtSoapEngine</directory>
</testsuite>
<testsuite name="Notification">
<directory>tests/Notification</directory>
</testsuite>
<testsuite name="Request">
<directory>tests/Request</directory>
</testsuite>
<testsuite name="TicketValidation">
<directory>tests/TicketValidation</directory>
</testsuite>
<testsuite name="RequestClientFactoryTest">
<file>tests/RequestClientFactoryTest.php</file>
</testsuite>
<testsuite name="SerializerTest">
<file>tests/SerializerTest.php</file>
</testsuite>
</testsuites>
</phpunit>

0 comments on commit 6acf1ec

Please sign in to comment.