-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb61723
commit 26ef87e
Showing
11 changed files
with
194 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
name: PHP Package | ||
on: | ||
push: | ||
pull_request: | ||
workflow_call: | ||
jobs: | ||
format-check: | ||
name: Check PSR12 Standarts | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.2 | ||
tools: composer:v2 | ||
- run: composer install | ||
shell: bash | ||
- run: composer format:check | ||
shell: bash | ||
tests: | ||
name: Run Tests | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
matrix: | ||
php-version: | ||
- 8.2 | ||
- 8.3 | ||
io-driver: | ||
- eio | ||
- uv | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: ${{ matrix.io-driver }} | ||
tools: composer:v2 | ||
coverage: xdebug3 | ||
- run: composer install | ||
shell: bash | ||
- run: composer test | ||
shell: bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
permissions: | ||
contents: write | ||
pull-requests: write | ||
|
||
name: Create Release | ||
|
||
jobs: | ||
verify-release: | ||
uses: ./.github/workflows/php-package.yml | ||
release-please: | ||
needs: verify-release | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: googleapis/release-please-action@v4 | ||
with: | ||
release-type: php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
composer.phar | ||
/vendor/ | ||
|
||
# Commit your application's lock file https://getcomposer.org/doc/01-basic-usage.md#commit-your-composer-lock-file-to-version-control | ||
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file | ||
# composer.lock | ||
/composer.lock | ||
/.idea | ||
/.phpunit.cache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
".": "1.0.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!env php | ||
<?php | ||
|
||
require_once __DIR__ . '/../vendor/autoload.php'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
{ | ||
"name": "ecomdev/mysql-to-jsonl", | ||
"description": "Export/Import JSONL files as data for MySQL tables", | ||
"type": "library", | ||
"require": { | ||
"php": "~8.2", | ||
"amphp/file": "~3.2", | ||
"amphp/mysql": "~3.0", | ||
"amphp/amp": "~3.0", | ||
"revolt/event-loop": "~1.0", | ||
"symfony/console": "~7.2" | ||
}, | ||
"require-dev": { | ||
"squizlabs/php_codesniffer": "^3.0", | ||
"phpunit/phpunit": "^11.5", | ||
"brianium/paratest": "^7.7", | ||
"ecomdev/testcontainers-magento-data":"~1.1" | ||
}, | ||
"license": [ | ||
"MIT" | ||
], | ||
"keywords": [ | ||
"mysql", "jsonl", "backup" | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"EcomDev\\MySQL2JSONL\\": "src" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"EcomDev\\MySQL2JSONL\\": "tests" | ||
} | ||
}, | ||
"scripts": { | ||
"test": "XDEBUG_MODE=coverage paratest --coverage-text", | ||
"format:check": "phpcs", | ||
"format:write": "phpcbf" | ||
}, | ||
"bin": [ | ||
"bin/mysql2jsonl" | ||
], | ||
"$schema": "https://getcomposer.org/schema.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="EcomDev"> | ||
<description>The coding standard for EcomDev packages.</description> | ||
|
||
<file>src</file> | ||
<file>tests</file> | ||
<exclude-pattern>tests/fixtures.php</exclude-pattern> | ||
|
||
<arg value="np"/> | ||
<arg name="colors"/> | ||
|
||
<!-- Include some additional sniffs from the Generic standard --> | ||
<rule ref="Generic.Commenting.DocComment"/> | ||
|
||
<!-- Use Unix newlines --> | ||
<rule ref="Generic.Files.LineEndings"> | ||
<properties> | ||
<property name="eolChar" value="\n"/> | ||
</properties> | ||
</rule> | ||
|
||
<rule ref="PSR2"/> | ||
<rule ref="PSR12"/> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/11.5/phpunit.xsd" bootstrap="vendor/autoload.php" executionOrder="depends,defects" beStrictAboutOutputDuringTests="true" colors="true" cacheDirectory=".phpunit.cache"> | ||
<testsuites> | ||
<testsuite name="default"> | ||
<directory>tests</directory> | ||
</testsuite> | ||
</testsuites> | ||
<source> | ||
<include> | ||
<directory>src</directory> | ||
</include> | ||
</source> | ||
<coverage ignoreDeprecatedCodeUnits="true"> | ||
</coverage> | ||
</phpunit> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"packages": { | ||
".": { | ||
"changelog-path": "CHANGELOG.md", | ||
"release-type": "php", | ||
"bump-minor-pre-major": true, | ||
"bump-patch-for-minor-pre-major": false, | ||
"draft": false, | ||
"include-v-in-tag": false, | ||
"prerelease": false | ||
} | ||
}, | ||
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?php | ||
|
||
namespace EcomDev\MySQL2JSONL; | ||
|
||
class ExportTableFactory | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace EcomDev\MySQL2JSONL; | ||
|
||
use PHPUnit\Framework\Attributes\Test; | ||
use PHPUnit\Framework\TestCase; | ||
|
||
class ExportTableTest extends TestCase | ||
{ | ||
#[Test] | ||
public function itworks() | ||
{ | ||
$this->assertTrue(true); | ||
} | ||
} |