-
-
Notifications
You must be signed in to change notification settings - Fork 0
Add comprehensive unit tests and CI pipeline #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,54 @@ | ||||||
| name: CI | ||||||
|
|
||||||
| on: | ||||||
| push: | ||||||
| branches: | ||||||
| - main | ||||||
| - master | ||||||
| - 'claude/**' | ||||||
| pull_request: | ||||||
| branches: | ||||||
| - main | ||||||
| - master | ||||||
|
|
||||||
| jobs: | ||||||
| test: | ||||||
| name: PHP ${{ matrix.php-version }} Tests | ||||||
| runs-on: ubuntu-latest | ||||||
|
|
||||||
| strategy: | ||||||
| fail-fast: false | ||||||
| matrix: | ||||||
| php-version: ['8.0', '8.1', '8.2'] | ||||||
|
|
||||||
| steps: | ||||||
| - name: Checkout code | ||||||
| uses: actions/checkout@v4 | ||||||
|
|
||||||
| - name: Setup PHP ${{ matrix.php-version }} | ||||||
| uses: shivammathur/setup-php@v2 | ||||||
| with: | ||||||
| php-version: ${{ matrix.php-version }} | ||||||
| extensions: mbstring, intl, pdo | ||||||
| coverage: none | ||||||
|
|
||||||
| - name: Validate composer.json | ||||||
| run: composer validate --strict | ||||||
|
||||||
| run: composer validate --strict | |
| run: composer validate |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -50,3 +50,4 @@ | |
|
|
||
| # Embedded web-server pid file | ||
| /.web-server-pid | ||
| .phpunit.result.cache | ||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -3,6 +3,8 @@ | |||
| namespace Plugin\MPBC43\EventListener; | ||||
|
|
||||
| use Doctrine\ORM\EntityManagerInterface; | ||||
| use Eccube\Entity\Product; | ||||
| use Eccube\Entity\ProductClass; | ||||
|
||||
| use Eccube\Entity\ProductClass; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CI matrix includes PHP 8.0, but composer.lock is pinned to phpunit/phpunit 10.5.63 (and related packages) which requires PHP >=8.1. With the lockfile present,
composer installwill fail on the 8.0 job. Either drop 8.0 from the matrix or update composer.json/lock to use a PHPUnit/dev-dependency set compatible with PHP 8.0 (e.g., pin PHPUnit 9.x), or run a per-versioncomposer updateinstead of relying on a single lockfile.