AutorÃa | Ultima modificación | Ver Log |
name: Moodle Plugin CIon: [pull_request]jobs:test:runs-on: ubuntu-20.04services: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:10.6.7env:MYSQL_USER: 'root'MYSQL_ALLOW_EMPTY_PASSWORD: "true"ports:- 3306:3306options: --health-cmd="mysqladmin ping" --health-interval 10s --health-timeout 5s --health-retries 3strategy:fail-fast: falsematrix:include:- php: '8.2'moodle-branch: 'MOODLE_403_STABLE'database: 'pgsql'- php: '8.1'moodle-branch: 'MOODLE_402_STABLE'database: 'mariadb'- php: '8.0'moodle-branch: 'MOODLE_401_STABLE'database: 'pgsql'steps:- name: Check out repository codeuses: actions/checkout@v2with:path: plugin- name: Setup PHP ${{ matrix.php }}uses: shivammathur/setup-php@v2with:php-version: ${{ matrix.php }}ini-values: max_input_vars=6000coverage: none- name: Initialise moodle-plugin-cirun: |composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci ^3echo $(cd ci/bin; pwd) >> $GITHUB_PATHecho $(cd ci/vendor/bin; pwd) >> $GITHUB_PATHsudo locale-gen en_AU.UTF-8- name: Install moodle-plugin-cirun: |moodle-plugin-ci install --plugin ./plugin --db-host=127.0.0.1env:DB: ${{ matrix.database }}MOODLE_BRANCH: ${{ matrix.moodle-branch }}IGNORE_PATHS: 'styles/*.css'IGNORE_NAMES: 'extra_css.mustache, select2.js, select2.min.js, select2.min.css, mustache_custom_loader.php'- 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 Detectorif: ${{ always() }}run: moodle-plugin-ci phpmd- name: Moodle Code Checkerif: ${{ always() }}run: moodle-plugin-ci codechecker --max-warnings 0- 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