-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
61 lines (49 loc) · 1.25 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
image: skylarkelty/docker-gitlab
cache:
paths:
- $HOME/.composer/cache
services:
- mysql:latest
variables:
MYSQL_ROOT_PASSWORD: "moodle_ci_password"
stages:
- checks
before_script:
- export MOODLE_BRANCH=MOODLE_31_STABLE
- export DB=mysqli
- export PLUGIN=`pwd`
- cd ../..
- rm -rf tmpbuild
- mkdir tmpbuild
- cd tmpbuild
- export TMPBUILD=`pwd`
- curl -sS https://getcomposer.org/installer | php
- php composer.phar create-project -n --no-dev --prefer-dist moodlerooms/moodle-plugin-ci ci ^1
- export PATH="$(cd ci/bin; pwd):$(cd ci/vendor/bin; pwd):$PATH"
- moodle-plugin-ci install --plugin $PLUGIN --db-type mysqli --db-user root --db-pass moodle_ci_password --db-name moodle_ci --db-host mysql
after_script:
- rm -rf $TMPBUILD
linter:
stage: checks
script:
- moodle-plugin-ci phplint
copypastedetect:
stage: checks
script:
- moodle-plugin-ci phpcpd
messdetect:
stage: checks
script:
- moodle-plugin-ci phpmd
codechecker:
stage: checks
script:
- moodle-plugin-ci codechecker
shifter:
stage: checks
script:
- moodle-plugin-ci shifter
validate:
stage: checks
script:
- moodle-plugin-ci validate