Skip to content

Commit ee9bc86

Browse files
committed
chore: use matrix generator
1 parent 9bf803f commit ee9bc86

File tree

1 file changed

+26
-5
lines changed

1 file changed

+26
-5
lines changed

.github/workflows/test.yml

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,41 @@ on:
1010
- cron: "5 15 * * *"
1111

1212
jobs:
13+
get-matrix:
14+
runs-on: ubuntu-latest
15+
outputs:
16+
matrix: ${{ steps.matrix.outputs.matrix }}
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
21+
- name: Get Shopware Version
22+
id: shopware-constraint
23+
run: echo "shopware_constraint=$(cat composer.json | jq -r '.require."shopware/core"')" >> $GITHUB_OUTPUT
24+
25+
- name: Get Shopware Matrix
26+
uses: tinect/github-shopware-matrix-generator@main
27+
id: matrix
28+
with:
29+
versionConstraint: ${{ steps.shopware-constraint.outputs.shopware_constraint }}
30+
allowEol: false
31+
justMinMaxShopware: false
32+
allowShopwareNext: true
33+
allowShopwareRC: false
1334
test:
1435
env:
1536
PLUGIN_NAME: TinectRedirects
37+
needs: get-matrix
1638
strategy:
1739
fail-fast: false
18-
matrix:
19-
version: [ "v6.6.0.0", "v6.6.1.2", "v6.6.2.0", "v6.6.3.1", "v6.6.4.0", "trunk" ]
40+
matrix: ${{ fromJson(needs.get-matrix.outputs.matrix) }}
2041
runs-on: ubuntu-latest
2142
steps:
2243
- name: Setup Shopware
2344
uses: shopware/setup-shopware@main
2445
with:
25-
shopware-version: ${{ matrix.version }}
26-
php-version: 8.2
46+
shopware-version: ${{ matrix.shopware }}
47+
php-version: ${{ matrix.php }}
2748
php-extensions: pcov
2849
install: true
2950

@@ -34,7 +55,7 @@ jobs:
3455
php -v
3556
3657
- name: Checkout
37-
uses: actions/checkout@v3
58+
uses: actions/checkout@v4
3859
with:
3960
path: ${{ github.workspace }}/custom/plugins/${{ env.PLUGIN_NAME }}
4061

0 commit comments

Comments
 (0)