Skip to content

Commit

Permalink
Isolate compatability tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
TravisCarden committed Apr 5, 2024
1 parent 77454c6 commit 0c2f785
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 11 deletions.
26 changes: 24 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ jobs:

# There's no reason to generate coverage data on multiple jobs--the result should be the same.
- name: "Run core tests without coverage"
run: "./vendor/bin/phpunit --no-coverage --exclude-group=windows_only"
run: "./vendor/bin/phpunit --no-coverage --testsuite=all --exclude-group=windows_only"
if: ${{ runner.os != 'Windows' && !( matrix.os == 'ubuntu' && matrix.dependencies == 'high' && matrix.php == '8.3' ) }}

- name: "Run Windows tests"
run: "./vendor/bin/phpunit --no-coverage --exclude-group=no_windows"
run: "./vendor/bin/phpunit --no-coverage --testsuite=all --exclude-group=no_windows"
if: ${{ runner.os == 'Windows' }}

performance:
Expand Down Expand Up @@ -122,6 +122,28 @@ jobs:
- name: "Run performance tests"
run: "composer phpbench -- --progress=plain --ansi"

compatability:
name: "Compatability"
runs-on: ubuntu-latest
steps:
- name: "Install rsync"
uses: GuillaumeFalourd/setup-rsync@v1.2 # https://github.com/marketplace/actions/setup-rsync

- name: "Set up PHP"
uses: shivammathur/setup-php@v2 # https://github.com/marketplace/actions/setup-php-action
with:
php-version: "8.3"
coverage: none

- name: "Checkout code"
uses: actions/checkout@v4 # https://github.com/marketplace/actions/checkout

- name: "Install dependencies"
uses: ramsey/composer-install@v3 # https://github.com/marketplace/actions/install-composer-dependencies

- name: "Run compatability tests"
run: "composer compatability"

mutation:
name: "Mutation"
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
"rm -r var/*/* &> /dev/null || true",
"git checkout -- var"
],
"compatability": "phpunit -- tests/Compatability",
"compatability": "phpunit --testsuite=compatability",
"dox": "phpunit --testdox --color=always --exclude-group=windows_only",
"fast": "phpunit --exclude-group=slow,windows_only",
"functional": "phpunit --testsuite=functional --exclude-group=windows_only",
Expand Down
1 change: 1 addition & 0 deletions grumphp.yml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ grumphp:
phpstan:
use_grumphp_paths: false
phpunit:
testsuite: all
exclude_group:
- windows_only
rector: ~
Expand Down
2 changes: 1 addition & 1 deletion infection.json5.dist
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"IncrementInteger": false,
"RoundingFamily": false
},
"testFrameworkOptions": "--exclude-group=slow,windows_only"
"testFrameworkOptions": "--testsuite=all --exclude-group=slow,windows_only"
}
3 changes: 2 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
>
<testsuites>
<testsuite name="all">
<directory>tests</directory>
<directory suffix="UnitTest.php">tests</directory>
<directory suffix="FunctionalTest.php">tests</directory>
</testsuite>
<testsuite name="unit">
<directory suffix="UnitTest.php">tests</directory>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@
use Symfony\Component\Filesystem\Filesystem;
use Symfony\Component\Process\Process;

/**
* @coversNothing
*
* @group slow
*/
final class CompatabilityFunctionalTest extends TestCase
/** @coversNothing */
final class CompatabilityTest extends TestCase
{
// @see https://github.com/php-tuf/composer-stager/wiki/Library-compatibility-policy#drupal
private const SUPPORTED_DRUPAL_VERSIONS = [
Expand Down

0 comments on commit 0c2f785

Please sign in to comment.