9
9
branches :
10
10
- ' *'
11
11
- " !l10n_*"
12
-
12
+
13
13
jobs :
14
14
phpunit :
15
15
name : PHPUnit and coverage Test (PHP ${{ matrix.php-versions }}, ${{ matrix.db-type }})
18
18
strategy :
19
19
fail-fast : false
20
20
matrix :
21
- php-versions : [ '8.1', '8.2', '8.3', '8.4' ]
21
+ php-versions : ['8.2', '8.3', '8.4' ]
22
22
db-type : [ 'mysql', 'sqlite', 'postgres' ]
23
23
24
24
env :
52
52
coverage : pcov
53
53
ini-values : xdebug.max_nesting_level=1000
54
54
extensions : mbstring, intl, gd, xsl, gmp, bcmath, :php-psr
55
-
55
+
56
56
- name : Start MySQL
57
57
run : sudo systemctl start mysql.service
58
58
if : matrix.db-type == 'mysql'
71
71
# mysql version: 5.7
72
72
# mysql database: 'part-db'
73
73
# mysql root password: '1234'
74
-
74
+
75
75
# # Setup caches
76
-
76
+
77
77
- name : Get Composer Cache Directory
78
78
id : composer-cache
79
79
run : |
83
83
path : ${{ steps.composer-cache.outputs.dir }}
84
84
key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
85
85
restore-keys : |
86
- ${{ runner.os }}-composer-
87
-
86
+ ${{ runner.os }}-composer-
87
+
88
88
- name : Get yarn cache directory path
89
89
id : yarn-cache-dir-path
90
90
run : echo "::set-output name=dir::$(yarn cache dir)"
@@ -96,48 +96,48 @@ jobs:
96
96
key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
97
97
restore-keys : |
98
98
${{ runner.os }}-yarn-
99
-
99
+
100
100
- name : Install composer dependencies
101
101
run : composer install --prefer-dist --no-progress
102
-
102
+
103
103
- name : Setup node
104
104
uses : actions/setup-node@v4
105
105
with :
106
106
node-version : ' 18'
107
-
107
+
108
108
- name : Install yarn dependencies
109
109
run : yarn install
110
-
110
+
111
111
- name : Build frontend
112
112
run : yarn build
113
-
113
+
114
114
- name : Create DB
115
115
run : php bin/console --env test doctrine:database:create --if-not-exists -n
116
116
if : matrix.db-type == 'mysql' || matrix.db-type == 'postgres'
117
-
117
+
118
118
- name : Do migrations
119
119
run : php bin/console --env test doctrine:migrations:migrate -n
120
120
121
121
# Use our own custom fixtures loading command to circumvent some problems with reset the autoincrement values
122
122
- name : Load fixtures
123
123
run : php bin/console --env test partdb:fixtures:load -n
124
-
124
+
125
125
- name : Run PHPunit and generate coverage
126
126
run : ./bin/phpunit --coverage-clover=coverage.xml
127
-
127
+
128
128
- name : Upload coverage
129
129
uses : codecov/codecov-action@v5
130
130
with :
131
131
env_vars : PHP_VERSION,DB_TYPE
132
132
token : ${{ secrets.CODECOV_TOKEN }}
133
133
fail_ci_if_error : true
134
-
134
+
135
135
- name : Test app:clean-attachments
136
136
run : php bin/console partdb:attachments:clean-unused -n
137
-
137
+
138
138
- name : Test app:convert-bbcode
139
139
run : php bin/console app:convert-bbcode -n
140
-
140
+
141
141
- name : Test app:show-logs
142
142
run : php bin/console app:show-logs -n
143
143
0 commit comments