AutorÃa | Ultima modificación | Ver Log |
name: Moodle Plugin CIon: [push, pull_request]jobs:test:runs-on: ubuntu-22.04services:postgres:image: postgres:12env: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:php: ['7.4']moodle-branch: ['MOODLE_39_STABLE','MOODLE_311_STABLE','MOODLE_401_STABLE']database: [pgsql, mariadb]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 }}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: 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-8echo "NVM_DIR=$HOME/.nvm" >> $GITHUB_ENV- 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 }}- 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 --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 --max-lint-warnings 0- name: PHPUnit testsif: ${{ always() }}run: moodle-plugin-ci phpunit --fail-on-warning- name: Behat featuresif: ${{ always() }}run: moodle-plugin-ci behat --profile chrome