Skip to content

Commit

Permalink
fix tests CI
Browse files Browse the repository at this point in the history
  • Loading branch information
d8vjork committed Feb 26, 2024
1 parent 95147d0 commit b233389
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
run: composer install --prefer-dist --no-interaction --no-suggest

- name: Execute tests
run: vendor/bin/pest --coverage-clover clover.xml
run: vendor/bin/pest -c phpunit.dist.xml --coverage-clover clover.xml

- name: Upload coverage reports to Codecov
if: matrix.php == '8.3'
Expand Down
23 changes: 0 additions & 23 deletions phpunit.coverage.dist.xml

This file was deleted.

31 changes: 13 additions & 18 deletions phpunit.dist.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.0/phpunit.xsd"
bootstrap="vendor/autoload.php"
backupGlobals="false"
colors="true"
processIsolation="true"
stopOnFailure="false"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
>
<testsuites>
<testsuite name="Package Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<php>
<ini name="memory_limit" value="2048M"/>
<env name="DB_CONNECTION" value="sqlite" force="true"/>
<env name="DB_DATABASE" value=":memory:" force="true"/>
</php>
<testsuites>
<testsuite name="Test Suite">
<directory suffix="Test.php">./tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
20 changes: 4 additions & 16 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,22 +1,10 @@
<?php

namespace OpenSoutheners\PhpPackage\Tests;
namespace Tests;

use OpenSoutheners\PhpPackage\ServiceProvider;
use Orchestra\Testbench\TestCase as Orchestra;
use PHPUnit\Framework\TestCase as BaseTestCase;

abstract class TestCase extends Orchestra
abstract class TestCase extends BaseTestCase
{
/**
* Get package providers.
*
* @param \Illuminate\Foundation\Application $app
* @return array<int, class-string>
*/
protected function getPackageProviders($app)
{
return [
ServiceProvider::class,
];
}
//
}

0 comments on commit b233389

Please sign in to comment.