Skip to content

Commit afff3ff

Browse files
committed
Exclude nova tests in PRs
1 parent a90d7c1 commit afff3ff

File tree

5 files changed

+10
-9
lines changed

5 files changed

+10
-9
lines changed

.travis.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,18 +23,19 @@ matrix:
2323
- php: 7.4
2424

2525
before_script:
26-
- travis_retry composer self-update
27-
- travis_retry composer config --global github-protocols https
28-
- travis_retry composer config http-basic.nova.laravel.com $NOVA_USERNAME $NOVA_PASSWORD
29-
- travis_retry composer install --no-interaction --prefer-source
26+
- travis_retry composer self-update;
27+
- travis_retry composer config --global github-protocols https;
28+
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then travis_retry composer config http-basic.nova.laravel.com $NOVA_USERNAME $NOVA_PASSWORD; fi'
29+
- travis_retry composer install --no-interaction --prefer-source;
3030
- if php -v | grep -q 'Xdebug'; then phpenv config-rm xdebug.ini; fi
3131
- pecl install pcov
3232
- psql -c "CREATE DATABASE testing;" -U postgres
3333
- psql -c "CREATE USER homestead WITH PASSWORD 'secret';" -U postgres
3434

3535
script:
3636
- mkdir -p build/logs
37-
- php vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml
37+
- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then php vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml --exclude-group nova; fi'
38+
- 'if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then php vendor/bin/phpunit -c phpunit.xml.dist --coverage-clover build/logs/clover.xml; fi'
3839

3940
after_success:
4041
- travis_retry php vendor/bin/php-coveralls -v

tests/Feature/Nova/BelongsToManyTest.php

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
use GeneaLabs\LaravelModelCaching\Tests\Fixtures\Book;
44
use GeneaLabs\LaravelModelCaching\Tests\Fixtures\Store;
55

6+
/** @group nova */
67
class BelongsToManyTest extends NovaTestCase
78
{
8-
/** @group test */
99
public function testAttachRelationFlushesCache()
1010
{
1111
$beforeStore = Store::with(['books'])->get()->first();
@@ -35,7 +35,6 @@ public function testAttachRelationFlushesCache()
3535
$this->assertSame('new foo', $book->title);
3636
}
3737

38-
/** @group test */
3938
public function testDetachRelationFlushesCache()
4039
{
4140
/** @var Store $store */
@@ -66,7 +65,6 @@ public function testDetachRelationFlushesCache()
6665
$this->assertCount(1, $books);
6766
}
6867

69-
/** @group test */
7068
public function testUpdateRelationFlushesCache()
7169
{
7270
$beforeStore = Store::with(['books'])->get()->first();
@@ -86,7 +84,6 @@ public function testUpdateRelationFlushesCache()
8684
$this->assertSame('foo', $book->title);
8785
}
8886

89-
/** @group test */
9087
public function testDeleteRelationFlushesCache()
9188
{
9289
$beforeStore = Store::with(['books'])->get()->first();

tests/Feature/Nova/CreateTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use GeneaLabs\LaravelModelCaching\Tests\Fixtures\Author;
44

5+
/** @group nova */
56
class CreateTest extends NovaTestCase
67
{
78
public function testCreateFlushesCacheForModel()

tests/Feature/Nova/DeleteTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use GeneaLabs\LaravelModelCaching\Tests\Fixtures\Author;
44

5+
/** @group nova */
56
class DeleteTest extends NovaTestCase
67
{
78
public function testDeleteFlushesCacheForModel()

tests/Feature/Nova/UpdateTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
use GeneaLabs\LaravelModelCaching\Tests\Fixtures\Author;
44

5+
/** @group nova */
56
class UpdateTest extends NovaTestCase
67
{
78
public function testUpdateFlushesCacheForModel()

0 commit comments

Comments
 (0)