Skip to content
Draft
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
27 changes: 22 additions & 5 deletions .github/workflows/plugin-ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ jobs:
uses: actions/checkout@v4
with:
repository: Cacti/cacti
ref: release/1.2.31
path: cacti

- name: Checkout Thold Plugin
Expand All @@ -85,7 +86,7 @@ jobs:
run: sudo apt-get update

- name: Install System Dependencies
run: sudo apt-get install -y apache2 snmp snmpd rrdtool fping libapache2-mod-php${{ matrix.php }}
run: sudo apt-get install -y apache2 snmp snmpd rrdtool fping

- name: Start SNMPD Agent and Test
run: |
Expand Down Expand Up @@ -188,18 +189,34 @@ jobs:
fi

- name: Remove the plugins directory exclusion from the .phpstan.neon
run: sed '/plugins/d' -i .phpstan.neon
run: |
if [ -f .phpstan.neon ]; then
sed '/plugins/d' -i .phpstan.neon
fi
working-directory: ${{ github.workspace }}/cacti

- name: Mark composer scripts executable
run: sudo chmod +x ${{ github.workspace }}/cacti/include/vendor/bin/*
run: |
if [ -d "${{ github.workspace }}/cacti/include/vendor/bin" ]; then
sudo find "${{ github.workspace }}/cacti/include/vendor/bin" -maxdepth 1 -type f -exec chmod +x {} +
fi

- name: Run Linter on base code
run: composer run-script lint ${{ github.workspace }}/cacti/plugins/thold
run: |
if composer run-script --list | grep -qE '^ lint'; then
composer run-script lint ${{ github.workspace }}/cacti/plugins/thold
else
echo 'Composer lint script is not defined; skipping.'
fi
working-directory: ${{ github.workspace }}/cacti

- name: Checking coding standards on base code
run: composer run-script phpcsfixer ${{ github.workspace }}/cacti/plugins/thold
run: |
if composer run-script --list | grep -qE '^ phpcsfixer'; then
composer run-script phpcsfixer ${{ github.workspace }}/cacti/plugins/thold
else
echo 'Composer phpcsfixer script is not defined; skipping.'
fi
working-directory: ${{ github.workspace }}/cacti

# - name: Run PHPStan at Level 6 on base code outside of Composer due to technical issues
Expand Down
Loading