Skip to content

Commit e32ee96

Browse files
committed
update CI/CD
1 parent 484d2f1 commit e32ee96

3 files changed

Lines changed: 7 additions & 2 deletions

File tree

.githooks/pre-commit

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ run_check "Rector" ./vendor/bin/rector --dry-run --ansi
3333
run_check "php-cs-fixer" ./vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.dist.php --dry-run --diff --ansi
3434
# 3. PHPStan: static analysis on the final result
3535
run_check "PHPStan" ./vendor/bin/phpstan --memory-limit=1G --ansi analyse
36+
# 4. PHPUnit: fast test suite, catches regressions before they hit CI
37+
run_check "PHPUnit" ./vendor/bin/phpunit --colors=always
3638

3739
if [ "$status" -ne 0 ]; then
3840
echo -e "${RED}⚠ Errors detected during commit analysis ⚠${ENDCOLOR}"

.github/workflows/check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
uses: shivammathur/setup-php@v2
1818
with:
1919
php-version: "8.5"
20-
extensions: mbstring, xml, ctype, iconv, intl, dom, filter, json, zip, tidy
20+
extensions: mbstring, xml, ctype, iconv, intl, dom, filter, json, zip, tidy, xsl
2121
tools: composer:v2
2222

2323
- name: Cache Composer packages

.github/workflows/deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
name: Deploy on production
22

33
on:
4-
push:
4+
workflow_run:
5+
workflows: [ "Code Quality Checks" ]
56
branches: [ main ]
7+
types: [ completed ]
68
workflow_dispatch:
79

810
jobs:
911
deploy:
1012
runs-on: ubuntu-latest
1113
environment: Production
14+
if: ${{ github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success' }}
1215

1316
steps:
1417
- name: Checkout code

0 commit comments

Comments
 (0)