-
Notifications
You must be signed in to change notification settings - Fork 16
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
Showing
4 changed files
with
128 additions
and
3 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,48 @@ | ||
name: Setup SwagMigrationMagento | ||
description: "Setup steps for SwagMigrationMagento" | ||
author: "shopware AG" | ||
branding: | ||
color: "blue" | ||
icon: "download" | ||
|
||
inputs: | ||
php-version: | ||
default: "8.2" | ||
required: false | ||
description: "Which PHP version should be used" | ||
mysql-version: | ||
default: "builtin" | ||
required: false | ||
description: "Which MySQL version should be used" | ||
|
||
runs: | ||
using: composite | ||
steps: | ||
- name: Setup SwagMigrationMagento | ||
uses: shopware/github-actions/setup-extension@main | ||
with: | ||
extensionName: SwagMigrationMagento | ||
install: true | ||
install-admin: true | ||
phpVersion: ${{ inputs.php-version }} | ||
mysqlVersion: ${{ inputs.mysql-version }} | ||
extraRepositories: | | ||
{ | ||
"SwagMigrationAssistant": { | ||
"type": "path", | ||
"url": "custom/plugins/SwagMigrationAssistant", | ||
"symlink": true | ||
}, | ||
"${{ github.event.repository.name }}": { | ||
"type": "path", | ||
"url": "custom/plugins/${{ github.event.repository.name }}", | ||
"symlink": true | ||
} | ||
} | ||
dependencies: | | ||
[ | ||
{ | ||
"name": "SwagMigrationAssistant", | ||
"repo": "https://github.com/shopware/SwagMigrationAssistant.git" | ||
} | ||
] |
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: Integration | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- trunk | ||
pull_request: | ||
|
||
jobs: | ||
danger: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: docker://ghcr.io/shyim/danger-php:latest | ||
with: | ||
args: ci | ||
env: | ||
GITHUB_REPOSITORY: ${{ github.repository }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GITHUB_PULL_REQUEST_ID: ${{ github.event.pull_request.number }} | ||
if: ${{ env.ACT != 'true' }} # Don't execute on local runs, this can only fail | ||
|
||
phpunit: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
MYSQL_IMAGE: ["mysql:8.0", "mariadb:10.11"] | ||
PHP_VERSION: ["8.2", "8.3"] | ||
steps: | ||
- name: Checkout SwagMigrationMagento | ||
uses: actions/checkout@v4 | ||
with: | ||
path: custom/plugins/${{ github.event.repository.name }} | ||
- name: Setup SwagMigrationMagento | ||
uses: ./custom/plugins/SwagMigrationMagento/.github/actions/setup-magento-plugin | ||
with: | ||
php-version: ${{ matrix.PHP_VERSION }} | ||
mysql-version: ${{ matrix.MYSQL_IMAGE }} | ||
- name: Run PHPUnit | ||
working-directory: custom/plugins/${{ github.event.repository.name }} | ||
run: | | ||
composer dump-autoload --dev | ||
php -d pcov.enabled=1 -d pcov.directory=${PWD}/src -d pcov.exclude='~(vendor|tests|node_modules)~' ${GITHUB_WORKSPACE}/vendor/bin/phpunit --configuration phpunit.xml.dist |
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,34 @@ | ||
name: PHP Checks | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- trunk | ||
pull_request: | ||
paths: | ||
- composer.json | ||
- src/**/*.php | ||
- tests/**/*.php | ||
|
||
jobs: | ||
codestyle_php: | ||
name: Codestyle PHP | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: shopware/github-actions/cs-fixer@main | ||
with: | ||
rules: "" | ||
|
||
phpstan: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout SwagMigrationMagento | ||
uses: actions/checkout@v4 | ||
with: | ||
path: custom/plugins/${{ github.event.repository.name }} | ||
- name: Setup SwagMigrationMagento | ||
uses: ./custom/plugins/SwagMigrationMagento/.github/actions/setup-magento-plugin | ||
- name: Run PHPStan | ||
run: | | ||
symfony composer -d custom/plugins/${{ github.event.repository.name }} dump-autoload --dev | ||
symfony composer -d custom/plugins/${{ github.event.repository.name }} run phpstan |
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