-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
68 lines (60 loc) · 2.06 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
cache:
paths:
- .composer/cache
variables:
TRAVIS_BUILD_DIR: "$CI_PROJECT_DIR"
MUSTACHE_IGNORE_NAMES: "email_html_body.mustache, email_html.mustache, email_text.mustache"
COMPOSER_HOME: "$CI_PROJECT_DIR/.composer/cache"
DOCKER_HOST: tcp://localhost:2375
DOCKER_TLS_CERTDIR: ""
.postgres:
before_script:
# Wait until database is ready
- timeout 3m bash -c 'echo -e "DB...\c"; until </dev/tcp/127.0.0.1/5432; do echo -e ".\c"; sleep 1; done; echo "ok";' 2> /dev/null
- cd ../..
- moodle-plugin-ci install --moodle="moodle-upstream-core" --db-user=moodleci --db-pass=moodleing --db-host=127.0.0.1
services:
- postgres:11
- docker:dind
variables:
DB: "pgsql"
POSTGRES_USER: "moodleci"
POSTGRES_PASSWORD: "moodleing"
.mariadb:
before_script:
# Wait until database is ready
- timeout 3m bash -c 'echo -e "DB...\c"; until </dev/tcp/127.0.0.1/3306; do echo -e ".\c"; sleep 1; done; echo "ok";' 2> /dev/null
- cd ../..
- moodle-plugin-ci install --moodle="moodle-upstream-core" --db-user=root --db-pass=superrootpass --db-host=127.0.0.1
services:
- mariadb:10.4-bionic
- docker:dind
variables:
DB: "mariadb"
MYSQL_ROOT_PASSWORD: "superrootpass"
.job_template: &job_definition
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
# Mustache check disabled as sortlist_entry.mustache fails with stray tags due to being nested inside a table defined in another template
#- moodle-plugin-ci mustache
- moodle-plugin-ci grunt
- moodle-plugin-ci phpdoc
- moodle-plugin-ci phpunit
- moodle-plugin-ci behat
code_checker_pgsql:
extends: .postgres
<<: *job_definition
image: amcdev/moodle-plugin-ci:7.3-docker-node-14.15.0
variables:
MOODLE_BRANCH: "MOODLE_310_STABLE"
code_checker_mariadb:
extends: .mariadb
<<: *job_definition
image: amcdev/moodle-plugin-ci:7.3-docker-node-14.15.0
variables:
MOODLE_BRANCH: "MOODLE_310_STABLE"