AutorÃa | Ultima modificación | Ver Log |
name: Testson: [push, pull_request]jobs:ci:name: ciruns-on: ubuntu-latestservices:postgres:image: postgresenv:POSTGRES_USER: 'postgres'POSTGRES_HOST_AUTH_METHOD: 'trust'options: --health-cmd="pg_isready" --health-interval 10s --health-timeout 5s --health-retries 5ports:- 5432:5432mariadb:image: mariadb:10env:MYSQL_USER: 'root'MYSQL_ALLOW_EMPTY_PASSWORD: "true"MYSQL_CHARACTER_SET_SERVER: "utf8mb4"MYSQL_COLLATION_SERVER: "utf8mb4_unicode_ci"options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 3ports:- 3306:3306strategy:fail-fast: falsematrix:moodle-branch: ['MOODLE_402_STABLE', 'MOODLE_403_STABLE', 'MOODLE_404_STABLE', 'main']php: ['8.2']database: ['mariadb', 'pgsql']include:- php: '8.3'moodle-branch: 'main'database: 'pgsql'steps:- name: checkout pluginuses: actions/checkout@v4with:path: this-plugin- name: setup PHPuses: shivammathur/setup-php@v2with:php-version: ${{ matrix.php }}ini-values: max_input_vars=5000coverage: pcov- name: composerrun: |composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ciecho $(cd ci/bin; pwd) >> $GITHUB_PATHecho $(cd ci/vendor/bin; pwd) >> $GITHUB_PATHsudo locale-gen en_AU.UTF-8- name: install Moodlerun: moodle-plugin-ci --ansi install --db-host=127.0.0.1 --plugin this-pluginenv:DB: ${{ matrix.database }}MOODLE_BRANCH: ${{ matrix.moodle-branch }}- name: phplintif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi phplint- name: phpmdif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi phpmd- name: phpdocif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi phpdoc- name: codecheckerif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi codechecker- name: validateif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi validate- name: savepointsif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi savepoints- name: gruntif: ${{ matrix.moodle-branch == 'main' }}run: moodle-plugin-ci --ansi grunt- name: mustacheif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi mustache- name: phpunitif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi phpunit --testdox --coverage-text --coverage-clover- name: privacyif: ${{ !cancelled() }}run: vendor/bin/phpunit --colors --no-coverage --testsuite tool_dataprivacy_testsuite,tool_policy_testsuite,core_privacy_testsuiteworking-directory: moodle- name: coverallsif: ${{ !cancelled() }}run: moodle-plugin-ci coveralls-upload || trueenv:COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}- name: firefoxid: behatif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi behat- name: faildumpif: ${{ failure() && steps.behat.outcome == 'failure' }}uses: actions/upload-artifact@v4with:name: firefox faildump (${{ join(matrix.*, ', ') }})path: ${{ github.workspace }}/moodledata/behat_dumpretention-days: 7if-no-files-found: ignore- name: chromeif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi behat --profile chrome- name: admin bookmarksif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi behat --auto-rerun=0 --profile chrome blocks/admin_bookmarksworking-directory: moodle- name: admin xmldbif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi behat --auto-rerun=0 --profile chrome admin/tool/xmldbworking-directory: moodle