11name : CI/CD
22
33on :
4- push :
5- branches :
6- - master
7- - main
84 pull_request :
95 branches :
10- - master
116 - main
7+ workflow_dispatch :
128
139jobs :
14- build :
10+ ci :
1511 name : ' CI'
1612 runs-on : ubuntu-latest
13+ if : ${{ contains(github.actor, 'dependabot') != true }}
14+ timeout-minutes : 30
1715
1816 steps :
1917 - uses : actions/checkout@v2
3634 - name : Run test suite
3735 run : composer run-script test
3836
37+ - name : Check code with PHP Inshights
38+ run : vendor/bin/phpinsights -n --ansi --format=github-action
39+
40+ - name : Check code with PHP Stan
41+ run : vendor/bin/phpstan --error-format=github
42+
43+ - name : Check for ray calls
44+ run : ./vendor/bin/x-ray src --github
45+
3946 - name : Send Slack notification
40474148 if : failure()
@@ -47,19 +54,13 @@ jobs:
4754 SLACK_WEBHOOK_URL : ${{ secrets.SLACK_WEBHOOK_URL }}
4855 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
4956
50- - name : Check code with PHP Inshights
51- run : vendor/bin/phpinsights -n --ansi --format=github-action
52-
53- - name : Check code with PHP Stan
54- run : vendor/bin/phpstan --error-format=github
55-
5657 - name : Format files
5758 run : ./vendor/bin/php-cs-fixer fix
5859
5960 - name : Commit files to repository
6061 uses : stefanzweifel/git-auto-commit-action@v4
6162 with :
62- commit_message : " CS Fixer applied [GHA] "
63+ commit_message : " chore: cs_fixer applied"
6364 commit_user_name : " API-Client GitHub Actions Bot"
6465 commit_user_email :
" [email protected] " 6566 commit_author :
" API-Client GitHub Actions Bot <[email protected] >"
0 commit comments