@@ -4,90 +4,90 @@ name: CI
44
55# Controls when the action will run.
66on :
7- # Triggers the workflow on push or pull request events but only for the dev branch
8- push :
9- branches : [ 3.x, 2.x, 1.x ]
10- pull_request :
11- branches : [ 3.x, 2.x, 1.x ]
12- release :
13- # Only use the types keyword to narrow down the activity types that will trigger your workflow.
14- types : [published, created, edited]
7+ # Triggers the workflow on push or pull request events but only for the dev branch
8+ push :
9+ branches : [ 3.x, 2.x, 1.x ]
10+ pull_request :
11+ branches : [ 3.x, 2.x, 1.x ]
12+ release :
13+ # Only use the types keyword to narrow down the activity types that will trigger your workflow.
14+ types : [ published, created, edited ]
1515
16- # Allows you to run this workflow manually from the Actions tab
17- workflow_dispatch :
16+ # Allows you to run this workflow manually from the Actions tab
17+ workflow_dispatch :
1818
1919# Set minimal permissions needed for Composer + GitHub Packages
2020permissions :
21- contents : read
21+ contents : read
2222
2323# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2424jobs :
25- # Analyse code by PHPStan
26- phpstan :
27- name : PHPStan
28- runs-on : ubuntu-latest
29- # This workflow is only of value to the ebics-api/ebics-client-php repository and
30- # would always fail in forks
31- if : github.repository == 'ebics-api/ebics-client-php'
32- steps :
33- - name : Checkout PR code
34- uses : actions/checkout@v3
35- with :
36- ref : ${{ github.event.pull_request.head.ref }}
37- repository : ${{ github.event.pull_request.head.repo.full_name }}
38- - name : Setup PHP
39- uses : shivammathur/setup-php@v2
40- with :
41- php-version : ' 8.1 '
42- - name : Composer Install
43- run : composer install --no-scripts --no-progress --ansi
44- - name : Run phpstan
45- run : composer code-analyse
25+ # Analyse code by PHPStan
26+ phpstan :
27+ name : PHPStan
28+ runs-on : ubuntu-latest
29+ # This workflow is only of value to the ebics-api/ebics-client-php repository and
30+ # would always fail in forks
31+ if : github.repository == 'ebics-api/ebics-client-php'
32+ steps :
33+ - name : Checkout PR code
34+ uses : actions/checkout@v3
35+ with :
36+ ref : ${{ github.event.pull_request.head.ref }}
37+ repository : ${{ github.event.pull_request.head.repo.full_name }}
38+ - name : Setup PHP
39+ uses : shivammathur/setup-php@v2
40+ with :
41+ php-version : ' 8.5 '
42+ - name : Composer Install
43+ run : composer install --no-scripts --no-progress --ansi
44+ - name : Run phpstan
45+ run : composer code-analyse
4646
47- # Style code by Code Sniffer
48- phpcs :
49- name : PHPCS
50- runs-on : ubuntu-latest
51- # This workflow is only of value to the ebics-api/ebics-client-php repository and
52- # would always fail in forks
53- if : github.repository == 'ebics-api/ebics-client-php'
54- steps :
55- - name : Checkout PR code
56- uses : actions/checkout@v3
57- with :
58- ref : ${{ github.event.pull_request.head.ref }}
59- repository : ${{ github.event.pull_request.head.repo.full_name }}
60- - name : Setup PHP
61- uses : shivammathur/setup-php@v2
62- with :
63- php-version : ' 8.1 '
64- - name : Composer Install
65- run : composer install --no-scripts --no-progress --ansi
66- - name : Run phpcs
67- run : composer code-style
47+ # Style code by Code Sniffer
48+ phpcs :
49+ name : PHPCS
50+ runs-on : ubuntu-latest
51+ # This workflow is only of value to the ebics-api/ebics-client-php repository and
52+ # would always fail in forks
53+ if : github.repository == 'ebics-api/ebics-client-php'
54+ steps :
55+ - name : Checkout PR code
56+ uses : actions/checkout@v3
57+ with :
58+ ref : ${{ github.event.pull_request.head.ref }}
59+ repository : ${{ github.event.pull_request.head.repo.full_name }}
60+ - name : Setup PHP
61+ uses : shivammathur/setup-php@v2
62+ with :
63+ php-version : ' 8.5 '
64+ - name : Composer Install
65+ run : composer install --no-scripts --no-progress --ansi
66+ - name : Run phpcs
67+ run : composer code-style
6868
69- # Test code by PHPUnit
70- phpunit :
71- name : PHPUnit
72- runs-on : ubuntu-latest
73- # This workflow is only of value to ebics-api/ebics-client-php repository and
74- # would always fail in forks
75- if : github.repository == 'ebics-api/ebics-client-php'
76- steps :
77- - name : Checkout PR code
78- uses : actions/checkout@v3
79- with :
80- ref : ${{ github.event.pull_request.head.ref }}
81- repository : ${{ github.event.pull_request.head.repo.full_name }}
82- - name : Setup PHP
83- uses : shivammathur/setup-php@v2
84- with :
85- php-version : ' 8.1 '
86- - name : Composer Install
87- run : composer install --no-scripts --no-progress --ansi
88- - name : Prepare data
89- run : unzip -P "$PASSWORD" ./tests/_data.zip -d .
90- env :
91- PASSWORD : ${{ secrets.PWD }}
92- - name : Run phpunit
93- run : composer code-test
69+ # Test code by PHPUnit
70+ phpunit :
71+ name : PHPUnit
72+ runs-on : ubuntu-latest
73+ # This workflow is only of value to ebics-api/ebics-client-php repository and
74+ # would always fail in forks
75+ if : github.repository == 'ebics-api/ebics-client-php'
76+ steps :
77+ - name : Checkout PR code
78+ uses : actions/checkout@v3
79+ with :
80+ ref : ${{ github.event.pull_request.head.ref }}
81+ repository : ${{ github.event.pull_request.head.repo.full_name }}
82+ - name : Setup PHP
83+ uses : shivammathur/setup-php@v2
84+ with :
85+ php-version : ' 8.5 '
86+ - name : Composer Install
87+ run : composer install --no-scripts --no-progress --ansi
88+ - name : Prepare data
89+ run : unzip -P "$PASSWORD" ./tests/_data.zip -d .
90+ env :
91+ PASSWORD : ${{ secrets.PWD }}
92+ - name : Run phpunit
93+ run : composer code-test
0 commit comments