Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 24 additions & 10 deletions .github/workflows/plugin-ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3']
php: ['8.1', '8.2', '8.3', '8.4']
os: [ubuntu-latest]

services:
mysql:
image: mysql:8.0
mariadb:
image: mariadb:10.6
env:
MYSQL_ROOT_PASSWORD: cactiroot
MYSQL_DATABASE: cacti
Expand Down Expand Up @@ -81,7 +81,6 @@ jobs:
- name: Check PHP version
run: php -v


- name: Run apt-get update
run: sudo apt-get update

Expand Down Expand Up @@ -129,7 +128,7 @@ jobs:
run: |
cd ${{ github.workspace }}/cacti
if [ -f composer.json ]; then
sudo composer install --prefer-dist --no-progress
sudo composer install --dev --no-progress
fi

- name: Create Cacti config.php
Expand All @@ -141,7 +140,6 @@ jobs:
sed -r "s/'cactiuser'/'cactiuser'/g" > ${{ github.workspace }}/cacti/include/config.php
sudo chmod 664 ${{ github.workspace }}/cacti/include/config.php


- name: Configure Apache
run: |
cat << 'EOF' | sed 's#GITHUB_WORKSPACE#${{ github.workspace }}#g' > /tmp/cacti.conf
Expand Down Expand Up @@ -179,7 +177,25 @@ jobs:
echo "Syntax errors found!"
exit 1
fi


- name: Remove the plugins directory exclusion from the .phpstan.neon
run: sed '/plugins/d' -i .phpstan.neon
working-directory: ${{ github.workspace }}/cacti

- name: Mark composer scripts executable
run: sudo chmod +x ${{ github.workspace }}/cacti/include/vendor/bin/*

- name: Run Linter on base code
run: composer run-script lint ${{ github.workspace }}/cacti/plugins/servcheck
working-directory: ${{ github.workspace }}/cacti

- name: Checking coding standards on base code
run: composer run-script phpcsfixer ${{ github.workspace }}/cacti/plugins/servcheck
working-directory: ${{ github.workspace }}/cacti

# - name: Run PHPStan at Level 6 on base code outside of Composer due to technical issues
# run: ./include/vendor/bin/phpstan analyze --level 6 ${{ github.workspace }}/cacti/plugins/servcheck
# working-directory: ${{ github.workspace }}/cacti

- name: Run Cacti Poller
run: |
Expand All @@ -191,12 +207,10 @@ jobs:
exit 1
fi



- name: View Cacti Logs
if: always()
run: |
if [ -f ${{ github.workspace }}/cacti/log/cacti.log ]; then
echo "=== Cacti Log ==="
sudo cat ${{ github.workspace }}/cacti/log/cacti.log
fi
fi
2 changes: 1 addition & 1 deletion setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ function plugin_servcheck_upgrade() {
}

if (!db_column_exists('plugin_servcheck_test', 'external_id')) {
db_add_column('plugin_servcheck_test', array('name' => 'external_id', 'type' => 'varchar(20)', 'NULL' => false, 'default' => '', 'after' => 'notes'));
db_add_column('plugin_servcheck_test', ['name' => 'external_id', 'type' => 'varchar(20)', 'NULL' => false, 'default' => '', 'after' => 'notes']);
}

// 0.3 contains a lot of changes. I tried to convert old data but for sure make a backup
Expand Down