-
Notifications
You must be signed in to change notification settings - Fork 35
76 lines (71 loc) · 2.7 KB
/
php.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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
DEPENDENCIES_WITH_COMMERCIAL: |-
[
{"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"}
]
DEPENDENCIES_WITHOUT_COMMERCIAL: |-
[
{"name": "SwagCmsExtensions", "repo": "https://shopware:$CMS_TOKEN@gitlab.shopware.com/shopware/6/services/cms-extensions.git"}
]
jobs:
compute:
runs-on: ubuntu-latest
outputs:
DEPENDENCIES_WITH_COMMERCIAL: ${{ env.DEPENDENCIES_WITH_COMMERCIAL }}
DEPENDENCIES_WITHOUT_COMMERCIAL: ${{ env.DEPENDENCIES_WITHOUT_COMMERCIAL }}
steps:
- name: Compute outputs
run: |
echo "DEPENDENCIES_WITH_COMMERCIAL=$(echo "$DEPENDENCIES_WITH_COMMERCIAL" | jq -c '.' 2>&1)" >> $GITHUB_ENV
echo "DEPENDENCIES_WITHOUT_COMMERCIAL=$(echo "$DEPENDENCIES_WITHOUT_COMMERCIAL" | jq -c '.' 2>&1)" >> $GITHUB_ENV
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: [ "${{needs.compute.outputs.DEPENDENCIES_WITH_COMMERCIAL}}", "${{needs.compute.outputs.DEPENDENCIES_WITHOUT_COMMERCIAL}}" ]
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 }}
codecovToken: ${{ secrets.CODECOV_TOKEN }}