Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
kurozumi committed May 21, 2024
1 parent 64b1e6f commit 4b39001
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 9 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/e2e-test.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
name: E2E test for EC-CUBE4 Plugin
on: [workflow_dispatch, pull_request]
env:
WORKING_DIRECTORY: 'ec-cube'
jobs:
selenium:
name: Selenium
Expand All @@ -21,10 +23,11 @@ jobs:

steps:
- name: Checkout EC-CUBE
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
repository: EC-CUBE/ec-cube
ref: ${{ matrix.eccube-versions }}
path: ${{ env.WORKING_DIRECTORY }}

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@master #https://github.com/shivammathur/setup-php
Expand All @@ -33,22 +36,25 @@ jobs:
extensions: mbstring, xml, ctype, iconv, mysql, intl, :xdebug
tools: composer:v2

- name: Initialize Composer
uses: ./.github/actions/composer

- name: Checkout
working-directory: ${{ env.WORKING_DIRECTORY }}
uses: actions/checkout@v2
with:
path: app/Plugin/${{ github.event.repository.name }}
ref: ${{ github.event.pull_request.head.sha }}

- name: Initialize Composer
uses: ./.github/actions/composer

- name: Setup EC-CUBE and Plugin
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
bin/console e:i
bin/console eccube:plugin:install --code ${{ github.event.repository.name }}
bin/console eccube:plugin:enable --code ${{ github.event.repository.name }}
- name: Start PHP Development Server
working-directory: ${{ env.WORKING_DIRECTORY }}
run: php -S localhost:8000 &

- name: Set up Python 3.7
Expand All @@ -57,12 +63,14 @@ jobs:
python-version: '3.7'

- name: Install Python dependencies
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
cd app/Plugin/${{ github.event.repository.name }}
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: E2E Test
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
cd app/Plugin/${{ github.event.repository.name }}/selenium
python -m unittest discover -v
11 changes: 7 additions & 4 deletions .github/workflows/phpstan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: PHPStan
on: [workflow_dispatch, pull_request]
env:
PLUGIN_CODE: ResizeImage42
PLUGIN_BRANCH: 4.2
WORKING_DIRECTORY: 'ec-cube'
jobs:
phpstan:
name: PHPStan
Expand All @@ -28,6 +28,7 @@ jobs:
with:
repository: EC-CUBE/ec-cube
ref: ${{ matrix.eccube-versions }}
path: ${{ env.WORKING_DIRECTORY }}

- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@master #https://github.com/shivammathur/setup-php
Expand All @@ -36,16 +37,18 @@ jobs:
extensions: mbstring, xml, ctype, iconv, mysql, intl, :xdebug
tools: composer:v2

- name: Initialize Composer
uses: ./.github/actions/composer

- name: Checkout
working-directory: ${{ env.WORKING_DIRECTORY }}
uses: actions/checkout@v3
with:
path: app/Plugin/${{ env.PLUGIN_CODE }}
ref: ${{ github.event.pull_request.head.sha }}

- name: Initialize Composer
uses: ./.github/actions/composer

- name: PHPStan
working-directory: ${{ env.WORKING_DIRECTORY }}
run: |
composer require phpstan/phpstan --dev
./vendor/bin/phpstan analyze app/Plugin/${{ env.PLUGIN_CODE }} -c "app/Plugin/${{ env.PLUGIN_CODE }}/phpstan.neon" --error-format=github
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: CI/CD for EC-CUBE4 Plugin
on: [ workflow_dispatch, pull_request ]
env:
PLUGIN_CODE: ResizeImage42
PACKAGE_NAME: 'ec-cube/purchaselimit42'
PACKAGE_NAME: 'ec-cube/resizeimage42'
WORKING_DIRECTORY: 'ec-cube'
APP_ENV: 'test'
APP_DEBUG: 0
Expand Down

0 comments on commit 4b39001

Please sign in to comment.