Skip to content
Merged
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
22 changes: 4 additions & 18 deletions .github/workflows/plugin-ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: |
cd cacti/plugins/syslog
if find . -name '*.php' -not -path './vendor/*' -exec php -l {} 2>&1 \; | grep -iv 'no syntax errors detected'; then
print "Syntax errors found!"
echo "Syntax errors found!"
exit 1
fi

Expand Down Expand Up @@ -139,7 +139,6 @@ jobs:
- name: Check PHP version
run: php -v


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

Expand Down Expand Up @@ -237,23 +236,12 @@ jobs:
cd ${{ github.workspace }}/cacti
sudo php cli/plugin_manage.php --plugin=syslog --install --enable

- name: Run Plugin Regression Tests
run: |
cd ${{ github.workspace }}/cacti/plugins/syslog
if [ -d tests/regression ]; then
for test in tests/regression/*.php; do
[ -f "$test" ] || continue
php "$test"
done
fi


- name: Run Cacti Poller
run: |
cd ${{ github.workspace }}/cacti
sudo php poller.php --poller=1 --force --debug
if ! grep -q "SYSTEM STATS" log/cacti.log; then
print "Cacti poller did not finish successfully"
echo "Cacti poller did not finish successfully"
cat log/cacti.log
exit 1
fi
Expand All @@ -264,22 +252,20 @@ jobs:
cd ${{ github.workspace }}/cacti/plugins/syslog/.github/workflows
sudo ./populate_syslog_incoming.sh


- name: force Syslog Plugin Poller
run: |
cd ${{ github.workspace }}/cacti
sudo php plugins/syslog/syslog_process.php --debug
if ! grep -q "SYSTEM SYSLOG STATS" log/cacti.log; then
print "Syslog plugin poller did not finish successfully"
echo "Syslog plugin poller did not finish successfully"
cat log/cacti.log
exit 1
fi


- name: View Cacti Logs
if: always()
run: |
if [ -f ${{ github.workspace }}/cacti/log/cacti.log ]; then
print "=== Cacti Log ==="
echo "=== Cacti Log ==="
sudo cat ${{ github.workspace }}/cacti/log/cacti.log
fi
Loading