Skip to content

Cron

Cron #16

Workflow file for this run

name: Cron
on:
schedule:
- cron: "5 10 9 * *"
jobs:
ci:
name: ci
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
moodle-branch: [main]
php: [8.2]
database: [mysqli]
steps:
- name: checkout plugin
uses: actions/checkout@v4
with:
path: this-plugin
- name: setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: max_input_vars=5000
coverage: pcov
- name: composer
run: |
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
sudo locale-gen en_AU.UTF-8
sudo systemctl start mysql.service
- name: install Moodle
run: moodle-plugin-ci install --db-user=root --db-pass=root --db-host=127.0.0.1 --plugin this-plugin
env:
DB: ${{ matrix.database }}
MOODLE_BRANCH: ${{ matrix.moodle-branch }}
- name: phplint
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi phplint
- name: phpmd
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi phpmd
- name: phpdoc
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi phpdoc
- name: codechecker
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi codechecker
- name: validate
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi validate
- name: savepoints
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi savepoints
- name: grunt
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi grunt
- name: mustache
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi mustache
- name: phpunit
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi phpunit --coverage-text --coverage-clover
- name: behat
if: ${{ !cancelled() }}
run: moodle-plugin-ci --ansi behat --profile=chrome
- name: privacy
if: ${{ !cancelled() }}
run: vendor/bin/phpunit --colors --no-coverage --testsuite tool_dataprivacy_testsuite,tool_policy_testsuite,core_privacy_testsuite
working-directory: moodle
- name: coveralls
if: ${{ !cancelled() }}
run: moodle-plugin-ci coveralls-upload || true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}