Skip to content

Updated codesniffer.yml - now running moodle-cs' phpcs.xml #4

Updated codesniffer.yml - now running moodle-cs' phpcs.xml

Updated codesniffer.yml - now running moodle-cs' phpcs.xml #4

Workflow file for this run

name: Codesniffer for Moodle Homework Plugin
on:
push:
branches: [ "10-homework-teacher-feature-be-able-to-add-links-for-other-sources" ]
pull_request:
branches: [ "10-homework-teacher-feature-be-able-to-add-links-for-other-sources" ]
jobs:
homework-plugin-codesniffer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Set up Composer
- name: Set up Composer
run: |
composer global config minimum-stability dev
composer global config --no-plugins allow-plugins.dealerdirect/phpcodesniffer-composer-installer true
composer global require moodlehq/moodle-cs
# Add Composer global bin to PATH
- name: Add Composer global bin to PATH
run: echo "PATH=$HOME/.composer/vendor/bin:$PATH" >> $GITHUB_ENV
# Run PHP_CodeSniffer
- name: Run Code Sniffer
run: phpcs --standard=$HOME/.composer/vendor/moodlehq/moodle-cs/phpcs.xml.dist server/moodle/mod/homework/