Skip to content

pgsql

pgsql #55

Workflow file for this run

name: Infection
on: [push, pull_request]
jobs:
infection:
name: infection
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
moodle-branch: [MOODLE_501_STABLE]
php: [8.3]
database: [pgsql]
steps:
- name: checkout plugin
uses: actions/checkout@v5
with:
path: this-plugin
- name: setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
ini-values: max_input_vars=5000
tools: infection, phpunit
coverage: pcov
- name: setup pgsql
uses: m4nu56/postgresql-action@v1
with:
postgresql version: 16
postgresql user: test
postgresql password: test
- name: composer
run: |
composer create-project -n --no-dev --prefer-dist moodlehq/moodle-plugin-ci ci
echo $(cd ci/bin; pwd) >> $GITHUB_PATH
echo $(cd ci/vendor/bin; pwd) >> $GITHUB_PATH
sudo locale-gen en_AU.UTF-8
- name: install Moodle
run: moodle-plugin-ci install --db-host=127.0.0.1 --db-type=pgsql --db-user=test --db-pass=test --plugin this-plugin
env:
DB: ${{ matrix.database }}
MOODLE_BRANCH: ${{ matrix.moodle-branch }}
- name: autoload
working-directory: moodle
run: |
echo '<?php' > vendor/autoloadmoodle.php
echo 'define("PHPUNIT_UTIL", true);' >> vendor/autoloadmoodle.php
echo 'require(__DIR__ . "/../public/lib/phpunit/bootstrap.php");' >> vendor/autoloadmoodle.php
echo 'require("autoload.php");' >> vendor/autoloadmoodle.php
- name: infection
run: infection -s --configuration=public/availability/condition/language/.infection.json5
working-directory: moodle