Files
local_webhooks/compose.yaml
T

149 lines
4.0 KiB
YAML
Raw Normal View History

2026-08-23 22:58:57 +04:00
x-ci: &ci
build:
context: .
dockerfile: .docker/ci/Dockerfile
command:
- /bin/bash
- -lc
- |
set -euo pipefail
php --version
composer --version
node --version
moodle-plugin-ci --version
2026-08-24 00:21:28 +04:00
moodle-plugin-ci install --plugin /plugin --branch "$$MOODLE_BRANCH" --db-host "$$DB_HOST"
test "$$(git -C /workspace/moodle rev-parse HEAD)" = "$$MOODLE_COMMIT"
2026-08-24 01:36:57 +04:00
moodle_root=/workspace/moodle
moodle_wwwroot="$$moodle_root/$$MOODLE_WWWROOT"
test -f "$$moodle_wwwroot/version.php"
test -d "$$moodle_wwwroot/local/webhooks"
test "$$MOODLE_WWWROOT" != public || test ! -e "$$moodle_root/version.php"
2026-08-23 22:58:57 +04:00
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
2026-08-12 16:57:33 +00:00
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
2026-08-23 22:58:57 +04:00
mysql:
profiles:
- mysql
image: mysql:8.4.11@sha256:b3b90af2a6552ae30c266fdb7d5dd55f3afb72404bb78d37fe8a23eb857fd3fb
environment:
MYSQL_ROOT_PASSWORD: moodle_ci
healthcheck:
test: ["CMD-SHELL", "mysql --protocol=TCP --host=127.0.0.1 --user=root --password=$$MYSQL_ROOT_PASSWORD --execute='SELECT 1' --silent"]
interval: 2s
timeout: 5s
retries: 30
tmpfs:
- /var/lib/mysql
2026-08-12 16:57:33 +00:00
ci:
2026-08-23 22:58:57 +04:00
<<: *ci
2026-08-12 16:57:33 +00:00
depends_on:
postgres:
condition: service_healthy
environment:
DB: pgsql
DB_HOST: postgres
DB_USER: postgres
MOODLE_BRANCH: v5.2.2
2026-08-24 00:21:28 +04:00
MOODLE_COMMIT: acfa383c13dd46c83ca82894a8e95fac273fda33
2026-08-24 01:36:57 +04:00
MOODLE_WWWROOT: public
2026-08-12 16:57:33 +00:00
NPM_CONFIG_FETCH_RETRIES: 5
2026-08-23 22:58:57 +04:00
ci-mysql:
<<: *ci
profiles:
- mysql
depends_on:
mysql:
condition: service_healthy
environment:
DB: mysqli
DB_HOST: mysql
DB_PASS: moodle_ci
DB_USER: root
MOODLE_BRANCH: v5.2.2
2026-08-24 00:21:28 +04:00
MOODLE_COMMIT: acfa383c13dd46c83ca82894a8e95fac273fda33
2026-08-24 01:36:57 +04:00
MOODLE_WWWROOT: public
2026-08-24 00:21:28 +04:00
NPM_CONFIG_FETCH_RETRIES: 5
ci-moodle45:
<<: *ci
profiles:
- moodle45
build:
context: .
dockerfile: .docker/ci/Dockerfile
args:
PHP_IMAGE: moodlehq/moodle-php-apache:8.1@sha256:13be2641be8883e79fd1e97374d0df759d80c81cce8331f3e85035923b7f4576
depends_on:
postgres:
condition: service_healthy
environment:
DB: pgsql
DB_HOST: postgres
DB_USER: postgres
MOODLE_BRANCH: v4.5.13
MOODLE_COMMIT: 8cbae18a2898cfd8266ec91ac206e12004f0ff5f
2026-08-24 01:36:57 +04:00
MOODLE_WWWROOT: .
NPM_CONFIG_FETCH_RETRIES: 5
ci-moodle50:
<<: *ci
profiles:
- moodle50
build:
context: .
dockerfile: .docker/ci/Dockerfile
args:
PHP_IMAGE: moodlehq/moodle-php-apache:8.2@sha256:3dae569f65e4ba1d2a413ea261d1dca72643bfa08a1e28a3d104a4024c4f040c
depends_on:
postgres:
condition: service_healthy
environment:
DB: pgsql
DB_HOST: postgres
DB_USER: postgres
MOODLE_BRANCH: v5.0.9
MOODLE_COMMIT: 152bf2ebbdd1f994331af21c80332b8d9051581c
MOODLE_WWWROOT: .
NPM_CONFIG_FETCH_RETRIES: 5
ci-moodle51:
<<: *ci
profiles:
- moodle51
build:
context: .
dockerfile: .docker/ci/Dockerfile
args:
PHP_IMAGE: moodlehq/moodle-php-apache:8.2@sha256:3dae569f65e4ba1d2a413ea261d1dca72643bfa08a1e28a3d104a4024c4f040c
depends_on:
postgres:
condition: service_healthy
environment:
DB: pgsql
DB_HOST: postgres
DB_USER: postgres
MOODLE_BRANCH: v5.1.6
MOODLE_COMMIT: 17513f6614237b530de7903fe32117fa026384c2
MOODLE_WWWROOT: public
2026-08-23 22:58:57 +04:00
NPM_CONFIG_FETCH_RETRIES: 5