Skip to content
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

GitHub actions #34

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
21 changes: 21 additions & 0 deletions .github/workflows/admin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Administration
on:
push:
branches:
- trunk
pull_request:

jobs:
unit:
name: Jest
uses: shopware/github-actions/.github/workflows/admin-jest.yml@main
with:
extensionName: ${{ github.event.repository.name }}
uploadCoverage: true
secrets:
codecovToken: ${{ secrets.CODECOV_TOKEN }}
lint:
name: ESLint
uses: shopware/github-actions/.github/workflows/admin-eslint.yml@main
with:
extensionName: ${{ github.event.repository.name }}
11 changes: 11 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: Build
on:
pull_request:
push:
branches:
- trunk
jobs:
build:
uses: shopware/github-actions/.github/workflows/build-zip.yml@main
with:
extensionName: SwagPayPal
67 changes: 67 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: PHP
on:
pull_request:
paths:
- '**/*.php'
- .github/workflows/php.yml

push:
paths:
- '**/*.php'
branches:
- trunk
workflow_dispatch:
schedule:
- cron: '0 3 * * *'

env:
SHOPWARE_TOOL_CACHE_PHPSTAN: ${{ github.workspace }}/var/phpstan
jobs:
cs:
if: github.event_name != 'schedule'
uses: shopware/github-actions/.github/workflows/cs-fixer.yml@main
phpstan:
uses: shopware/github-actions/.github/workflows/phpstan.yml@main
with:
extensionName: SwagPayPal
shopwareVersion: trunk
dependencies: |-
[
{"name": "SwagCommercial", "repo": "https://shopware:$COMMERCIAL_TOKEN@gitlab.shopware.com/shopware/6/product/commercial.git"},
{"name": "SwagCmsExtensions", "repo": "https://shopware:$CMS_TOKEN@gitlab.shopware.com/shopware/6/services/cms-extensions.git"}
]
secrets:
env: |-
CMS_TOKEN=${{ secrets.CMS_GITLAB_TOKEN }}
COMMERCIAL_TOKEN=${{ secrets.COMMERCIAL_GITLAB_TOKEN }}
phpunit:
uses: shopware/github-actions/.github/workflows/phpunit.yml@main
strategy:
matrix:
phpVersion: [ 8.2, 8.3 ]
mysqlVersion: ["mysql:8.0", "mariadb:10.11"]
dependencies:
- |-
[
{"name": "SwagCommercial", "repo": "https://shopware:$COMMERCIAL_TOKEN@gitlab.shopware.com/shopware/6/product/commercial.git"},
{"name": "SwagCmsExtensions", "repo": "https://shopware:$CMS_TOKEN@gitlab.shopware.com/shopware/6/services/cms-extensions.git"}
]
- |-
[
{"name": "SwagCmsExtensions", "repo": "https://shopware:$CMS_TOKEN@gitlab.shopware.com/shopware/6/services/cms-extensions.git"}
]
with:
uploadCoverage: true
extensionName: SwagPayPal
shopwareVersion: ${{ matrix.shopware-version }}
phpVersion: ${{ matrix.phpVersion }}
mysqlVersion: ${{ matrix.mysqlVersion }}
dependencies: ${{ matrix.dependencies }}
secrets:
env: |-
CMS_TOKEN=${{ secrets.CMS_GITLAB_TOKEN }}
COMMERCIAL_TOKEN=${{ secrets.COMMERCIAL_GITLAB_TOKEN }}
codecovToken: ${{ secrets.CODECOV_TOKEN }}



12 changes: 12 additions & 0 deletions .github/workflows/store-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
name: Release to Store
on:
workflow_dispatch:
jobs:
build:
uses: shopware/github-actions/.github/workflows/store-release.yml@main
with:
extensionName: ${{ github.event.repository.name }}
secrets:
accountUser: ${{ secrets.SHOPWARE_ACCOUNT_USER }}
accountPassword: ${{ secrets.SHOPWARE_ACCOUNT_PASSWORD }}
ghToken: ${{ secrets.GITHUB_TOKEN }}
40 changes: 40 additions & 0 deletions .github/workflows/storefront.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Storefront
on:
push:
branches:
- trunk
pull_request:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Clone Shopware
uses: actions/checkout@v4
with:
repository: shopware/shopware
ref: trunk
- name: Clone Extension
uses: actions/checkout@v4
with:
path: custom/plugins/${{ github.event.repository.name }}

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: '20.x'

- name: Install Shopware Dependencies
working-directory: src/Storefront/Resources/app/storefront
run: npm install --no-audit --no-fund --prefer-offline

- name: Install Plugin Dependencies
working-directory: custom/plugins/${{ github.event.repository.name }}/src/Resources/app/storefront
run: npm install --no-audit --no-fund --prefer-offline

- name: Run ESLint
working-directory: custom/plugins/${{ github.event.repository.name }}/src/Resources/app/storefront
run: |
../../../../../../../src/Storefront/Resources/app/storefront/node_modules/.bin/eslint --config ../../../../../../../src/Storefront/Resources/app/storefront/.eslintrc.js ./src
../../../../../../../src/Storefront/Resources/app/storefront/node_modules/.bin/stylelint --config ../../../../../../../src/Storefront/Resources/app/storefront/stylelint.config.js ./src

4 changes: 3 additions & 1 deletion bin/phpstan-config-generator.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

/*
* (c) shopware AG <info@shopware.com>
Expand Down
4 changes: 3 additions & 1 deletion bin/static-analyze-autoloader.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
4 changes: 3 additions & 1 deletion ecs.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
17 changes: 5 additions & 12 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
includes:
- %ShopwareRoot%/vendor/phpstan/phpstan/conf/bleedingEdge.neon
- ../../../vendor/phpstan/phpstan/conf/bleedingEdge.neon
- ../../../src/Core/DevOps/StaticAnalyze/PHPStan/extension.neon
- ../../../src/Core/DevOps/StaticAnalyze/PHPStan/rules.neon

parameters:
phpVersion: 80100
Expand All @@ -15,11 +17,10 @@ parameters:
excludePaths:
- src/Resources
- src/DevOps/Rector

symfony:
constant_hassers: false
# the placeholder "%ShopwareHashedCacheDir%" will be replaced on execution by bin/phpstan-config-generator.php script
container_xml_path: '../../..%ShopwareHashedCacheDir%/%ShopwareKernelClass%DevDebugContainer.xml'
containerXmlPath: '../../../var/cache/phpstan_dev/Shopware_Core_DevOps_StaticAnalyze_StaticAnalyzeKernelPhpstan_devDebugContainer.xml'
consoleApplicationLoader: ../../../src/Core/DevOps/StaticAnalyze/console-application.php

ignoreErrors:
# We won't type all arrays/iterables for now
Expand All @@ -45,11 +46,3 @@ parameters:
path: tests/Webhook/Registration/WebhookSystemConfigControllerTest.php
count: 11

bootstrapFiles:
- bin/static-analyze-autoloader.php

rules:
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\Internal\InternalClassRule
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\Internal\InternalClassRule
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\Internal\InternalMethodRule
- Shopware\Core\DevOps\StaticAnalyze\PHPStan\Rules\PackageAnnotationRule
4 changes: 3 additions & 1 deletion rector.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);

use Rector\Config\RectorConfig;
use Rector\Symfony\Set\SymfonySetList;
Expand Down
4 changes: 3 additions & 1 deletion src/Administration/PayPalPaymentMethodController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
4 changes: 3 additions & 1 deletion src/Checkout/ACDC/ACDCValidator.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
4 changes: 3 additions & 1 deletion src/Checkout/ACDC/ACDCValidatorInterface.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
4 changes: 3 additions & 1 deletion src/Checkout/Cart/Service/CartPriceService.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
4 changes: 3 additions & 1 deletion src/Checkout/Cart/Service/ExcludedProductValidator.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
4 changes: 3 additions & 1 deletion src/Checkout/Cart/Validation/CartValidator.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
4 changes: 3 additions & 1 deletion src/Checkout/CheckoutSubscriber.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
4 changes: 3 additions & 1 deletion src/Checkout/Exception/CurrencyNotFoundException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
4 changes: 3 additions & 1 deletion src/Checkout/Exception/MissingPayloadException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
4 changes: 3 additions & 1 deletion src/Checkout/Exception/OrderFailedException.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
4 changes: 3 additions & 1 deletion src/Checkout/ExpressCheckout/ExpressCheckoutButtonData.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
4 changes: 3 additions & 1 deletion src/Checkout/ExpressCheckout/ExpressCheckoutData.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
4 changes: 3 additions & 1 deletion src/Checkout/ExpressCheckout/ExpressCheckoutSubscriber.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<?php declare(strict_types=1);
<?php

declare(strict_types=1);
/*
* (c) shopware AG <info@shopware.com>
* For the full copyright and license information, please view the LICENSE
Expand Down
Loading