1
1
name : " build"
2
-
3
2
on :
4
3
push :
5
4
branches :
6
5
- " *.x"
7
- pull_request : ~
6
+ paths-ignore :
7
+ - " *.md"
8
+ pull_request :
9
+ paths-ignore :
10
+ - " *.md"
8
11
workflow_dispatch : ~
9
12
13
+ env :
14
+ PHP_EXTENSIONS : " mbstring"
15
+
10
16
jobs :
11
17
coding-standards :
12
18
name : " Coding Standards"
@@ -25,24 +31,25 @@ jobs:
25
31
- name : " Checkout"
26
32
uses : " actions/checkout@v4"
27
33
28
- - name : " Install PHP with extensions"
34
+ - name : " Setup PHP, with composer and extensions"
29
35
uses : " shivammathur/setup-php@v2"
30
36
with :
31
- coverage : " none"
32
37
php-version : " ${{ matrix.php-version }}"
33
-
34
- - name : " Validate composer.json and composer.lock"
35
- run : " composer validate --strict"
38
+ extensions : " ${{ env.PHP_EXTENSIONS }}"
39
+ coverage : " none"
36
40
37
41
- name : " Install composer dependencies"
38
- uses : " ramsey/composer-install@v2 "
42
+ uses : " ramsey/composer-install@v3 "
39
43
with :
40
44
dependency-versions : " ${{ matrix.dependencies }}"
41
45
42
- - name : " Run ergebnis/composer-normalize"
46
+ - name : " Validate composer"
47
+ run : " composer validate --strict"
48
+
49
+ - name : " Check composer normalized"
43
50
run : " composer normalize --dry-run"
44
51
45
- - name : " Run symplify/easy-coding-standard "
52
+ - name : " Check style "
46
53
run : " composer check-style"
47
54
48
55
dependency-analysis :
@@ -54,31 +61,40 @@ jobs:
54
61
matrix :
55
62
php-version :
56
63
- " 8.1"
64
+ - " 8.2"
65
+ - " 8.3"
57
66
58
67
dependencies :
68
+ - " lowest"
59
69
- " highest"
60
70
61
71
steps :
62
72
- name : " Checkout"
63
73
uses : " actions/checkout@v4"
64
74
65
- - name : " Install PHP with extensions"
75
+ - name : " Setup PHP, with composer and extensions"
66
76
uses : " shivammathur/setup-php@v2"
67
77
with :
68
78
coverage : " none"
79
+ extensions : " ${{ env.PHP_EXTENSIONS }}"
69
80
php-version : " ${{ matrix.php-version }}"
70
- tools : " composer-require-checker, composer-unused"
81
+
82
+ - name : " Remove require-dev section in composer.json"
83
+ run : " composer config --unset require-dev"
84
+
85
+ - name : " Remove autoload-dev section in composer.json"
86
+ run : " composer config --unset autoload-dev"
87
+
88
+ - name : " Add shipmonk/composer-dependency-analyser to composer.json"
89
+ run : " composer require --dev --no-install --no-update --no-plugins --no-scripts shipmonk/composer-dependency-analyser"
71
90
72
91
- name : " Install composer dependencies"
73
- uses : " ramsey/composer-install@v2 "
92
+ uses : " ramsey/composer-install@v3 "
74
93
with :
75
94
dependency-versions : " ${{ matrix.dependencies }}"
76
95
77
- - name : " Run maglnet/composer-require-checker"
78
- run : " composer-require-checker check"
79
-
80
- - name : " Run icanhazstring/composer-unused"
81
- run : " composer-unused"
96
+ - name : " Run dependency analysis"
97
+ run : " vendor/bin/composer-dependency-analyser"
82
98
83
99
static-code-analysis :
84
100
name : " Static Code Analysis"
@@ -89,25 +105,31 @@ jobs:
89
105
matrix :
90
106
php-version :
91
107
- " 8.1"
108
+ - " 8.2"
109
+ - " 8.3"
92
110
93
111
dependencies :
112
+ - " lowest"
94
113
- " highest"
95
114
96
115
steps :
97
116
- name : " Checkout"
98
117
uses : " actions/checkout@v4"
99
118
100
- - name : " Install PHP with extensions"
119
+ - name : " Setup PHP, with composer and extensions"
101
120
uses : " shivammathur/setup-php@v2"
102
121
with :
103
- coverage : " none"
104
122
php-version : " ${{ matrix.php-version }}"
123
+ extensions : " ${{ env.PHP_EXTENSIONS }}"
124
+ coverage : " none"
105
125
106
126
- name : " Install composer dependencies"
107
- uses : " ramsey/composer-install@v2 "
127
+ uses : " ramsey/composer-install@v3 "
108
128
with :
109
129
dependency-versions : " ${{ matrix.dependencies }}"
110
130
131
+ - name : " Static analysis"
132
+ run : " composer analyse"
111
133
unit-tests :
112
134
name : " Unit tests"
113
135
@@ -117,6 +139,8 @@ jobs:
117
139
matrix :
118
140
php-version :
119
141
- " 8.1"
142
+ - " 8.2"
143
+ - " 8.3"
120
144
121
145
dependencies :
122
146
- " lowest"
@@ -126,16 +150,26 @@ jobs:
126
150
- name : " Checkout"
127
151
uses : " actions/checkout@v4"
128
152
153
+ - name : " Build Docker image"
154
+ run : " docker build -t setono/deployer-cron --no-cache ./tests/docker"
155
+
156
+ - name : " Run Docker container"
157
+ run : " docker run -d -p 2222:22 setono/deployer-cron"
158
+
159
+ - name : " Change permissions"
160
+ run : " chmod 600 ./tests/docker/ssh/id_rsa && chmod 644 ./tests/docker/ssh/id_rsa.pub"
161
+
129
162
- name : " Setup PHP, with composer and extensions"
130
163
uses : " shivammathur/setup-php@v2"
131
164
with :
132
- php-version : " ${{ matrix.php-version }}"
133
165
coverage : " none"
166
+ extensions : " ${{ env.PHP_EXTENSIONS }}"
167
+ php-version : " ${{ matrix.php-version }}"
134
168
135
169
- name : " Install composer dependencies"
136
- uses : " ramsey/composer-install@v2 "
170
+ uses : " ramsey/composer-install@v3 "
137
171
with :
138
172
dependency-versions : " ${{ matrix.dependencies }}"
139
173
140
174
- name : " Run phpunit"
141
- run : " composer phpunit"
175
+ run : " vendor/bin/ phpunit"
0 commit comments