47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
services:
|
|||
|
|
postgres:
|
||
|
|
image: postgres:16.13-alpine3.22@sha256:caf536ebd910e85473a9f5e2fd1aea360c965c4a911c8555ac1f61b2102006cb
|
||
|
|
environment:
|
||
|
|
POSTGRES_HOST_AUTH_METHOD: trust
|
||
|
|
POSTGRES_USER: postgres
|
||
|
|
healthcheck:
|
||
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
||
|
|
interval: 2s
|
||
|
|
timeout: 5s
|
||
|
|
retries: 15
|
||
|
|
tmpfs:
|
||
|
|
- /var/lib/postgresql/data
|
||
|
|
|
||
|
|
ci:
|
||
|
|
build:
|
||
|
|
context: .
|
||
|
|
dockerfile: .docker/ci/Dockerfile
|
||
|
|
depends_on:
|
||
|
|
postgres:
|
||
|
|
condition: service_healthy
|
||
|
|
environment:
|
||
|
|
DB: pgsql
|
||
|
|
DB_HOST: postgres
|
||
|
|
DB_USER: postgres
|
||
|
|
MOODLE_BRANCH: v5.2.2
|
||
|
|
NPM_CONFIG_FETCH_RETRIES: 5
|
||
|
|
volumes:
|
||
|
|
- .:/plugin:ro
|
||
|
|
command:
|
||
|
|
- /bin/bash
|
||
|
|
- -lc
|
||
|
|
- |
|
||
|
|
set -euo pipefail
|
||
|
|
php --version
|
||
|
|
composer --version
|
||
|
|
node --version
|
||
|
|
moodle-plugin-ci --version
|
||
|
|
moodle-plugin-ci install --plugin /plugin --branch v5.2.2 --db-host postgres
|
||
|
|
test "$$(git -C /workspace/moodle rev-parse HEAD)" = "acfa383c13dd46c83ca82894a8e95fac273fda33"
|
||
|
|
moodle-plugin-ci phplint
|
||
|
|
moodle-plugin-ci phpcs --max-warnings 0
|
||
|
|
moodle-plugin-ci phpdoc --max-warnings 0
|
||
|
|
moodle-plugin-ci validate
|
||
|
|
moodle-plugin-ci savepoints
|
||
|
|
moodle-plugin-ci phpunit --fail-on-warning
|