-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
70 lines (62 loc) · 1.55 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
cache:
paths:
- .composer/cache
variables:
CI_BUILD_DIR: "$CI_PROJECT_DIR"
COMPOSER_HOME: "$CI_PROJECT_DIR/.composer/cache"
POSTGRES_USER: "postgres"
POSTGRES_HOST_AUTH_METHOD: "trust"
MYSQL_ROOT_HOST: "%"
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
MYSQL_CHARACTER_SET_SERVER: "utf8mb4"
MYSQL_COLLATION_SERVER: "utf8mb4_unicode_ci"
.job_template: &job_configuration
image: quay.io/amc/moodle-plugin-ci:${PHP_VERSION}-node.16
before_script:
- cd ../..
- moodle-db-isready
- moodle-plugin-ci install --moodle="moodle-upstream-core" --db-host=$DB_HOST --db-port=$DB_PORT
script:
- moodle-plugin-ci phplint
- moodle-plugin-ci phpcpd
- moodle-plugin-ci phpmd
- moodle-plugin-ci codechecker
- moodle-plugin-ci validate
- moodle-plugin-ci savepoints
- moodle-plugin-ci mustache
#- moodle-plugin-ci grunt
- moodle-plugin-ci phpdoc
- moodle-plugin-ci phpunit
- moodle-plugin-ci behat --profile chrome
parallel:
matrix:
- MOODLE_BRANCH: [ "MOODLE_402_STABLE" ]
PHP_VERSION: [ "8.0" ]
test:postgres:
<<: *job_configuration
services:
- postgres:14
- docker:dind
variables:
DB: pgsql
DB_HOST: postgres
DB_PORT: 5432
test:mysql:
<<: *job_configuration
services:
- name: mysql:8.0.23
command: ["mysqld", "--port=6033"]
- docker:dind
variables:
DB: mysqli
DB_HOST: mysql
DB_PORT: 6033
test:mariadb:
<<: *job_configuration
services:
- mariadb:10.6
- docker:dind
variables:
DB: "mariadb"
DB_HOST: "mariadb"
DB_PORT: 3306