Skip to content

Commit 8b30ee9

Browse files
committed
chore: add check and format scripts
1 parent 3d3b6e1 commit 8b30ee9

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

.github/workflows/check.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Check
2+
on:
3+
schedule:
4+
- cron: "5 15 * * *"
5+
workflow_dispatch:
6+
pull_request:
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
cs:
13+
if: github.event_name != 'schedule'
14+
runs-on: ubuntu-24.04
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Run CS
20+
uses: shopware/github-actions/extension-verifier@main
21+
with:
22+
action: format
23+
24+
check:
25+
runs-on: ubuntu-24.04
26+
strategy:
27+
fail-fast: false
28+
matrix:
29+
version-selection: [ 'lowest', 'highest']
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
34+
- name: Run Check
35+
uses: shopware/github-actions/extension-verifier@main
36+
with:
37+
action: check
38+
check-against: ${{ matrix.version-selection }}

composer.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,12 @@
4141
"de-DE": "https://github.com/FriendsOfShopware/FroshAltchaCaptcha/",
4242
"en-GB": "https://github.com/FriendsOfShopware/FroshAltchaCaptcha/"
4343
}
44+
},
45+
"scripts": {
46+
"check": [
47+
"docker run --rm -v $(pwd):/ext shopware/shopware-cli:latest extension validate --check-against lowest --full /ext",
48+
"docker run --rm -v $(pwd):/ext shopware/shopware-cli:latest extension validate --check-against highest --full /ext"
49+
],
50+
"format": "docker run --rm -v $(pwd):/ext shopware/shopware-cli:latest extension format /ext"
4451
}
4552
}

0 commit comments

Comments
 (0)