Skip to content

Commit

Permalink
Try dependency matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
AydinHassan committed Jan 19, 2024
1 parent 3b58906 commit d35880b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: Build
on:
pull_request:
push:
branches:
- trunk

jobs:
build:
uses: shopware/github-actions/.github/workflows/build-zip.yml@main
Expand Down
31 changes: 24 additions & 7 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,26 @@ on:

env:
SHOPWARE_TOOL_CACHE_PHPSTAN: ${{ github.workspace }}/var/phpstan
DEPENDENCIES_WITH_COMMERCIAL: |-
[
{"name": "SwagCommercial", "repo": "https://shopware:[email protected]/shopware/6/product/commercial.git"},
{"name": "SwagCmsExtensions", "repo": "https://shopware:[email protected]/shopware/6/services/cms-extensions.git"}
]
DEPENDENCIES_WITHOUT_COMMERCIAL: |-
[
{"name": "SwagCmsExtensions", "repo": "https://shopware:[email protected]/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
Expand All @@ -35,21 +54,19 @@ jobs:
CMS_TOKEN=${{ secrets.CMS_GITLAB_TOKEN }}
COMMERCIAL_TOKEN=${{ secrets.COMMERCIAL_GITLAB_TOKEN }}
phpunit:
uses: shopware/github-actions/.github/workflows/phpunit.yml@phpunit-matrix
uses: shopware/github-actions/.github/workflows/phpunit.yml@main
strategy:
matrix:
phpVersion: [ 8.2, 8.3 ]
mysqlVersion: ["mysql:8.0", "mariadb:10.11"]
# 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: |-
[
{"name": "SwagCmsExtensions", "repo": "https://shopware:[email protected]/shopware/6/services/cms-extensions.git"}
]
# mysqlVersion: ${{ matrix.mysqlVersion }}
dependencies: ${{ matrix.dependencies }}
secrets:
env: |-
CMS_TOKEN=${{ secrets.CMS_GITLAB_TOKEN }}
Expand Down

0 comments on commit d35880b

Please sign in to comment.