PLGMAG2V2-863: Prepare changes for the 3.13.0 release (#313) #11
This file contains hidden or 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
| name: Magento 2 PHPStan | |
| on: [push] | |
| jobs: | |
| phpstan: | |
| name: PHPStan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '7.4' | |
| env: | |
| COMPOSER_AUTH_JSON: | | |
| { | |
| "http-basic": { | |
| "repo.magento.com": { | |
| "username": "${{ secrets.MAGENTO_MARKETPLACE_USERNAME }}", | |
| "password": "${{ secrets.MAGENTO_MARKETPLACE_PASSWORD }}" | |
| } | |
| } | |
| } | |
| - uses: actions/checkout@v4 | |
| - name: Create composer project | |
| run: composer create-project --no-install --no-interaction --no-plugins --repository-url=https://repo-magento-mirror.fooman.co.nz/ magento/project-community-edition:2.4.5-p8 /home/runner/work/magento | |
| - name: Create magento2-frontend directory in package-source | |
| run: mkdir -p /home/runner/work/magento/package-source/multisafepay/magento2-frontend | |
| - name: Move repository content | |
| run: cp -r -f ${{ github.workspace }}/* /home/runner/work/magento/package-source/multisafepay/magento2-frontend | |
| - name: Checkout Magento 2 Adminhtml Repository | |
| continue-on-error: true | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: multisafepay/magento2-internal-adminhtml | |
| token: ${{ secrets.GLOBAL_GITHUB_TOKEN }} | |
| ref: ${{ github.ref_name }} | |
| - name: Create magento2-adminhtml directory in package-source | |
| if: success() | |
| run: mkdir -p /home/runner/work/magento/package-source/multisafepay/magento2-adminhtml | |
| - name: Move Magento 2 Adminhtml Repository content | |
| if: success() | |
| continue-on-error: true | |
| run: cp -r -f ${{ github.workspace }}/* /home/runner/work/magento/package-source/multisafepay/magento2-adminhtml | |
| - name: Checkout Magento 2 Core Repository | |
| continue-on-error: true | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: multisafepay/magento2-internal-core | |
| token: ${{ secrets.GLOBAL_GITHUB_TOKEN }} | |
| ref: ${{ github.ref_name }} | |
| - name: Create magento2-core directory in package-source | |
| if: success() | |
| run: mkdir -p /home/runner/work/magento/package-source/multisafepay/magento2-core | |
| - name: Move Magento 2 Core Repository content | |
| if: success() | |
| continue-on-error: true | |
| run: cp -r -f ${{ github.workspace }}/* /home/runner/work/magento/package-source/multisafepay/magento2-core | |
| - name: Checkout PHP-SDK | |
| continue-on-error: true | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: multisafepay/php-sdk-internal | |
| token: ${{ secrets.GLOBAL_GITHUB_TOKEN }} | |
| ref: ${{ github.ref_name }} | |
| - name: Create php-sdk directory in package-source | |
| if: success() | |
| run: mkdir -p /home/runner/work/magento/package-source/multisafepay/php-sdk | |
| - name: Move PHP-SDK Repository content | |
| if: success() | |
| continue-on-error: true | |
| run: cp -r -f ${{ github.workspace }}/* /home/runner/work/magento/package-source/multisafepay/php-sdk | |
| - name: Add composer plugins | |
| working-directory: /home/runner/work/magento | |
| run: composer config --no-plugins allow-plugins true | |
| - name: Add MultiSafepay packages to Composer | |
| working-directory: /home/runner/work/magento | |
| run: composer config repositories.multisafepay "path" "package-source/multisafepay/*" | |
| - name: Add module to composer | |
| working-directory: /home/runner/work/magento | |
| run: composer require multisafepay/magento2-frontend --no-update --no-interaction | |
| - name: Install composer dependencies | |
| working-directory: /home/runner/work/magento | |
| run: composer install --no-interaction | |
| - name: Install PHPStan extension installer | |
| working-directory: /home/runner/work/magento | |
| run: composer require --dev phpstan/extension-installer | |
| - name: Install PHPStan Magento extension | |
| working-directory: /home/runner/work/magento | |
| run: composer require --dev bitexpert/phpstan-magento | |
| - name: Run PHPStan | |
| working-directory: /home/runner/work/magento | |
| run: vendor/bin/phpstan analyse -c vendor/multisafepay/magento2-frontend/phpstan.neon --error-format github |