84-homework-student-feature-use-the-saved-completions-time-to-generate-stats-and-averages #151
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Codesniffer for Moodle Homework Plugin | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ "main" ] | |
paths: | |
- 'server/moodle/blocks/homework/**' | |
- 'server/moodle/mod/homework/**' | |
pull_request: | |
types: [opened, reopened, synchronize] | |
paths: | |
- 'server/moodle/blocks/homework/**' | |
- 'server/moodle/mod/homework/**' | |
jobs: | |
homework-plugin-codesniffer: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Composer and export PATH | |
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 | |
echo "PATH=$HOME/.composer/vendor/bin:$PATH" >> $GITHUB_ENV | |
- name: Run Code Sniffer on mod_homework | |
if: always() | |
run: | | |
phpcs --standard=moodle-extra --runtime-set ignore_warnings_on_exit 1 server/moodle/mod/homework/ | |
- name: Run Code Sniffer on block_homework | |
if: always() | |
run: | | |
phpcs --standard=moodle-extra --runtime-set ignore_warnings_on_exit 1 server/moodle/blocks/homework/ |