Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion .github/workflows/action-phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ on:
platform_branch:
required: true
type: string
coverage:
required: false
type: boolean
default: false
secrets:
CODECOV_TOKEN:
required: false

jobs:
phpunit:
Expand Down Expand Up @@ -36,4 +43,14 @@ jobs:
run: mysql -uroot < _fixtures/database/shopware55.sql

- name: Run PHPUnit
run: composer -d custom/plugins/${{ inputs.extension_name }} run phpunit
run: composer -d custom/plugins/${{ inputs.extension_name }} run phpunit -- ${{ inputs.coverage && '--coverage-clover clover.xml' || '' }}

- name: Upload coverage to Codecov
if: inputs.coverage
uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
root_dir: ${{ github.workspace }}/custom/plugins/${{ inputs.extension_name }}
working-directory: ${{ github.workspace }}/custom/plugins/${{ inputs.extension_name }}
files: ./clover.xml
3 changes: 3 additions & 0 deletions .github/workflows/integration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ jobs:
with:
extension_name: ${{ github.event.repository.name }}
platform_branch: trunk
coverage: true
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

smoke_test:
name: Smoke test
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ src/Resources/app/administration/.tmp

# plugin
/migration_assistant.cache
/clover.xml
3 changes: 2 additions & 1 deletion tests/TestBootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
} elseif (is_readable(__DIR__ . '/../../../../src/Core/TestBootstrapper.php')) {
require __DIR__ . '/../../../../src/Core/TestBootstrapper.php';
} else {
exit('Could not find TestBootstrapper.php');
fwrite(\STDERR, 'Could not find TestBootstrapper.php' . \PHP_EOL);
exit(1);
}

return (new TestBootstrapper())
Expand Down
3 changes: 1 addition & 2 deletions tests/unit/Migration/Logging/Log/MigrationLogTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use SwagMigrationAssistant\Migration\Connection\SwagMigrationConnectionEntity;
use SwagMigrationAssistant\Migration\Logging\Log\Builder\AbstractMigrationLogEntry;
use SwagMigrationAssistant\Migration\Logging\Log\Builder\MigrationLogBuilder;
use SwagMigrationAssistant\Migration\Logging\Log\Builder\MigrationLogEntry;
use SwagMigrationAssistant\Migration\Logging\Log\ConvertAssociationMissingLog;
use SwagMigrationAssistant\Migration\Logging\Log\ConvertChildEntityFailedLog;
use SwagMigrationAssistant\Migration\Logging\Log\ConvertDocumentTypeUnsupportedLog;
Expand Down Expand Up @@ -56,7 +55,7 @@
* @internal
*/
#[Package('fundamentals@after-sales')]
#[CoversClass(MigrationLogEntry::class)]
#[CoversClass(AbstractMigrationLogEntry::class)]
class MigrationLogTest extends TestCase
{
/**
Expand Down
Loading