Skip to content

Merge pull request #92 from AAU-P5-Moodle/84-homework-student-feature… #152

Merge pull request #92 from AAU-P5-Moodle/84-homework-student-feature…

Merge pull request #92 from AAU-P5-Moodle/84-homework-student-feature… #152

Workflow file for this run

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/