AutorÃa | Ultima modificación | Ver Log |
name: Moodle plugin CIon: [push, pull_request]jobs:test:runs-on: 'ubuntu-latest'services:postgres:image: postgres:13env:POSTGRES_USER: 'postgres'POSTGRES_HOST_AUTH_METHOD: 'trust'ports:- 5432:5432options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3mariadb:image: mariadb:10env:MYSQL_USER: 'root'MYSQL_ALLOW_EMPTY_PASSWORD: "true"MYSQL_CHARACTER_SET_SERVER: "utf8mb4"MYSQL_COLLATION_SERVER: "utf8mb4_unicode_ci"ports:- 3306:3306options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 3strategy:fail-fast: falsematrix:include:- php: '8.1'moodle-branch: 'MOODLE_402_STABLE'database: 'pgsql'- php: '8.0'moodle-branch: 'MOODLE_401_STABLE'database: 'mariadb'- php: '7.4'moodle-branch: 'MOODLE_400_STABLE'database: 'pgsql'steps:- name: Checkoutuses: actions/checkout@v3with:path: plugin- name: Setup PHPuses: shivammathur/setup-php@v2with:php-version: ${{ matrix.php }}extensions: ${{ matrix.extensions }}ini-values: max_input_vars=5000# none to use phpdbg fallback. Specify pcov (Moodle 3.10 and up) or xdebug to use them instead.coverage: none- name: Deploy moodle-plugin-cirun: |composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3# Add dirs to $PATHecho $(cd ci/bin; pwd) >> $GITHUB_PATHecho $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH# PHPUnit depends on en_AU.UTF-8 localesudo locale-gen en_AU.UTF-8- name: Install Moodle# Need explicit IP to stop mysql client fail on attempt to use unix socket.run: moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1env:DB: ${{ matrix.database }}MOODLE_BRANCH: ${{ matrix.moodle-branch }}IGNORE_PATHS: 'templates/local/mobile'- name: PHP Lintif: ${{ always() }}run: moodle-plugin-ci phplint- name: PHP Copy/Paste Detectorcontinue-on-error: true # This step will show errors but will not failif: ${{ always() }}run: moodle-plugin-ci phpcpd- name: PHP Mess Detectorcontinue-on-error: true # This step will show errors but will not failif: ${{ always() }}run: moodle-plugin-ci phpmd- name: Moodle Code Checkerif: ${{ always() }}run: moodle-plugin-ci codechecker- name: Moodle PHPDoc Checkerif: ${{ always() }}run: moodle-plugin-ci phpdoc- name: Validatingif: ${{ always() }}run: moodle-plugin-ci validate- name: Check upgrade savepointsif: ${{ always() }}run: moodle-plugin-ci savepoints- name: Mustache Lintif: ${{ always() }}run: moodle-plugin-ci mustache- name: Gruntif: ${{ always() }}run: moodle-plugin-ci grunt- name: PHPUnit testsif: ${{ always() }}run: moodle-plugin-ci phpunit- name: Behat featuresif: ${{ always() }}run: moodle-plugin-ci behat --profile chrome