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:php: ['8.2']moodle-branch: ['MOODLE_402_STABLE', 'MOODLE_403_STABLE', 'MOODLE_404_STABLE']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=5000tools: composer:v2.5coverage: 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 --coverage-text --coverage-clover- name: privacyif: ${{ matrix.moodle-branch == 'main'}}run: vendor/bin/phpunit --colors --no-coverage --testsuite tool_dataprivacy_testsuite,tool_policy_testsuite,core_privacy_testsuiteworking-directory: moodle- name: otherif: ${{ matrix.moodle-branch == 'main'}}run: vendor/bin/phpunit --colors --no-coverage --testsuite core_availability_testsuiteworking-directory: moodle- name: coverallsif: ${{ matrix.moodle-branch == 'main'}}run: moodle-plugin-ci coveralls-upload || trueenv:COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}- name: firefoxif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi behat- name: chromeif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi behat --profile chrome- name: firefox classicif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi behat --suite="classic"- name: chrome classicif: ${{ !cancelled() }}run: moodle-plugin-ci --ansi behat --suite="classic" --profile chrome- name: admin bookmarksif: ${{ matrix.moodle-branch == 'main'}}run: moodle-plugin-ci --ansi behat --auto-rerun=0 --profile chrome blocks/admin_bookmarksworking-directory: moodle- name: admin xmldbif: ${{ matrix.moodle-branch == 'main'}}run: moodle-plugin-ci --ansi behat --auto-rerun=0 --profile chrome admin/tool/xmldbworking-directory: moodle