Skip to content

Update main.yml

Update main.yml #165

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
ci:
name: ci
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['8.1']
moodle-branch: ['MOODLE_401_STABLE']
database: ['mysqli']
steps:
- name: checkout plugin
uses: actions/checkout@v3
with:
path: this-plugin
- name: add plugin
uses: actions/checkout@v3
with:
repository: bdecentgmbh/moodle-mod_pulse
path: extras/mod_pulse
- name: add plugin
uses: actions/checkout@v3
with:
repository: edu-sharing/plugin-moodle-edu-sharing
submodules: true
path: extras/mod_edu-sharing
- 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 ^4
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 --extra-plugins=extras
env:
DB: ${{ matrix.database }}
MOODLE_BRANCH: ${{ matrix.moodle-branch }}
- name: phplint
if: ${{ always() }}
run: moodle-plugin-ci --ansi phplint
- name: phpcpd
if: ${{ always() }}
run: moodle-plugin-ci --ansi phpcpd
- name: phpmd
if: ${{ always() }}
run: moodle-plugin-ci --ansi phpmd
- name: phpdoc
if: ${{ always() }}
run: moodle-plugin-ci --ansi phpdoc
- name: codechecker
if: ${{ always() }}
run: moodle-plugin-ci --ansi codechecker
- name: validate
if: ${{ always() }}
run: moodle-plugin-ci --ansi validate
- name: savepoints
if: ${{ always() }}
run: moodle-plugin-ci --ansi savepoints
- name: grunt
if: ${{ matrix.moodle-branch == 'MOODLE_402_STABLE'}}
run: moodle-plugin-ci --ansi grunt
- name: mustache
if: ${{ always() }}
run: moodle-plugin-ci --ansi mustache
- name: phpunit
if: ${{ always() }}
run: moodle-plugin-ci --ansi phpunit --testdox --coverage-text --coverage-clover
- name: privacy
if: ${{ always() }}
run: vendor/bin/phpunit --colors --no-coverage --testsuite tool_dataprivacy_testsuite,tool_policy_testsuite,core_privacy_testsuite
working-directory: moodle
- name: coveralls
if: ${{ always() }}
run: moodle-plugin-ci coveralls-upload || true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: firefox
if: ${{ always() }}
run: moodle-plugin-ci --ansi behat
- name: chrome
if: ${{ always() }}
run: moodle-plugin-ci --ansi behat --profile chrome
- name: firefox classic
if: ${{ always() }}
run: moodle-plugin-ci --ansi behat --suite="classic"
- name: chrome classic
if: ${{ always() }}
run: moodle-plugin-ci --ansi behat --suite="classic" --profile chrome
- name: admin bookmarks
if: ${{ always() }}
run: moodle-plugin-ci --ansi behat --auto-rerun=0 --profile chrome blocks/admin_bookmarks
working-directory: moodle
- name: admin xmldb
if: ${{ always() }}
run: moodle-plugin-ci --ansi behat --auto-rerun=0 --profile chrome admin/tool/xmldb
working-directory: moodle