@@ -38,12 +38,12 @@ jobs:
3838 strategy :
3939 fail-fast : false
4040 matrix :
41- php : ['8.1', '8.2', '8.3']
41+ php : ['8.1', '8.2', '8.3', '8.4' ]
4242 os : [ubuntu-latest]
4343
4444 services :
45- mysql :
46- image : mysql:8.0
45+ mariadb :
46+ image : mariadb:10.6
4747 env :
4848 MYSQL_ROOT_PASSWORD : cactiroot
4949 MYSQL_DATABASE : cacti
8181 - name : Check PHP version
8282 run : php -v
8383
84-
8584 - name : Run apt-get update
8685 run : sudo apt-get update
8786
@@ -129,7 +128,7 @@ jobs:
129128 run : |
130129 cd ${{ github.workspace }}/cacti
131130 if [ -f composer.json ]; then
132- sudo composer install --prefer-dist --no-progress
131+ sudo composer install --dev --no-progress
133132 fi
134133
135134 - name : Create Cacti config.php
@@ -141,7 +140,6 @@ jobs:
141140 sed -r "s/'cactiuser'/'cactiuser'/g" > ${{ github.workspace }}/cacti/include/config.php
142141 sudo chmod 664 ${{ github.workspace }}/cacti/include/config.php
143142
144-
145143 - name : Configure Apache
146144 run : |
147145 cat << 'EOF' | sed 's#GITHUB_WORKSPACE#${{ github.workspace }}#g' > /tmp/cacti.conf
@@ -179,7 +177,25 @@ jobs:
179177 echo "Syntax errors found!"
180178 exit 1
181179 fi
182-
180+
181+ - name : Remove the plugins directory exclusion from the .phpstan.neon
182+ run : sed '/plugins/d' -i .phpstan.neon
183+ working-directory : ${{ github.workspace }}/cacti
184+
185+ - name : Mark composer scripts executable
186+ run : sudo chmod +x ${{ github.workspace }}/cacti/include/vendor/bin/*
187+
188+ - name : Run Linter on base code
189+ run : composer run-script lint ${{ github.workspace }}/cacti/plugins/servcheck
190+ working-directory : ${{ github.workspace }}/cacti
191+
192+ - name : Checking coding standards on base code
193+ run : composer run-script phpcsfixer ${{ github.workspace }}/cacti/plugins/servcheck
194+ working-directory : ${{ github.workspace }}/cacti
195+
196+ # - name: Run PHPStan at Level 6 on base code outside of Composer due to technical issues
197+ # run: ./include/vendor/bin/phpstan analyze --level 6 ${{ github.workspace }}/cacti/plugins/servcheck
198+ # working-directory: ${{ github.workspace }}/cacti
183199
184200 - name : Run Cacti Poller
185201 run : |
@@ -191,12 +207,10 @@ jobs:
191207 exit 1
192208 fi
193209
194-
195-
196210 - name : View Cacti Logs
197211 if : always()
198212 run : |
199213 if [ -f ${{ github.workspace }}/cacti/log/cacti.log ]; then
200214 echo "=== Cacti Log ==="
201215 sudo cat ${{ github.workspace }}/cacti/log/cacti.log
202- fi
216+ fi
0 commit comments