From 3ba660fd4e0e25ef9682fe7ce00634150f05b87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcel=20Kr=C3=A4ml?= Date: Fri, 6 Dec 2024 12:08:44 +0100 Subject: [PATCH] NEXT-00000 - Add Github Actions --- .../actions/setup-magento-plugin/action.yml | 36 +++++++++++++++++++ .github/workflows/php.yml | 25 +++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 .github/actions/setup-magento-plugin/action.yml create mode 100644 .github/workflows/php.yml diff --git a/.github/actions/setup-magento-plugin/action.yml b/.github/actions/setup-magento-plugin/action.yml new file mode 100644 index 0000000..faf80d6 --- /dev/null +++ b/.github/actions/setup-magento-plugin/action.yml @@ -0,0 +1,36 @@ +name: Setup SwagMigrationMagento +description: "Setup steps for SwagMigrationMagento" +author: "shopware AG" +branding: + color: "blue" + icon: "download" + +runs: + using: composite + steps: + - name: Setup SwagMigrationMagento + uses: shopware/github-actions/setup-extension@main + with: + extensionName: SwagMigrationMagento + install: true + install-admin: true + 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" + } + ] diff --git a/.github/workflows/php.yml b/.github/workflows/php.yml new file mode 100644 index 0000000..5b1224a --- /dev/null +++ b/.github/workflows/php.yml @@ -0,0 +1,25 @@ +name: PHP Checks +on: + pull_request: + +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 + - uses: shopware/github-actions/phpstan@main + with: + extensionName: ${{ github.event.repository.name }}