-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
154 lines (142 loc) · 5.18 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
image: moodlehq/moodle-workplace-plugin-ci:8.0-ci4.1.5
services:
- postgres:13
#- mysql:5.7.26
- name: selenium/standalone-chrome:3
alias: selenium-standalone-chrome
variables:
MOODLE_REPO: [email protected]:workplace/workplacedev.git
MOODLE_BRANCH_WORKPLACE402R: WORKPLACE_ROLLING_402
MOODLE_BRANCH_WORKPLACE402S: WORKPLACE_402
MOODLE_BRANCH_WORKPLACE401S: WORKPLACE_401
MOODLE_BRANCH_WORKPLACE400: WORKPLACE_400
MOODLE_REPO_LMS: [email protected]:moodle/moodle.git
MOODLE_BRANCH_LMS400: MOODLE_400_STABLE
MOODLE_BRANCH_LMS401: MOODLE_401_STABLE
MOODLE_BRANCH_LMS402: MOODLE_402_STABLE
MOODLE_BEHAT_WDHOST: "http://selenium-standalone-chrome:4444/wd/hub"
POSTGRES_USER: postgres
POSTGRES_PASSWORD: ""
POSTGRES_HOST_AUTH_METHOD: "trust"
MYSQL_ALLOW_EMPTY_PASSWORD: "true"
DB: "pgsql"
# DB: "mysqli"
before_script:
- export MOODLE_BRANCH=$MOODLE_BRANCH_WORKPLACE402R
- . prepare-workplace $cibot_sshkey
- cd $CI_PROJECT_DIR/..
- moodle-plugin-ci add-plugin --clone [email protected]:workplace/moodle-theme_workplace.git
- moodle-plugin-ci add-plugin --clone [email protected]:workplace/moodle-tool_wp.git
- moodle-plugin-ci install --db-host="$DB_HOST" --no-init -vvv
- cd moodle
codecheck:
script:
- php admin/tool/phpunit/cli/util.php --install
- php admin/tool/phpunit/cli/util.php --buildconfig
- php admin/tool/phpunit/cli/util.php --buildcomponentconfigs
- . check-start
- . check no_workplace_licenses
- . check this_plugin_is_part_of "the format_wplist plugin for Moodle - http://moodle.org/" --nowplicensecomment
- . check version_number
- . check language_file_sorting
- . check behat_workplace_tag
- . check moodle-plugin-ci phplint
- . check moodle-plugin-ci phpcpd
#- . check moodle-plugin-ci phpmd
- . check moodle-plugin-ci codechecker --max-warnings 0
- . check moodle-plugin-ci phpdoc
- . check moodle-plugin-ci validate
- . check moodle-plugin-ci savepoints
- . check moodle-plugin-ci mustache
- . check moodle-plugin-ci grunt --max-lint-warnings 0
- . check vendor/bin/phpunit --fail-on-risky --disallow-test-output --testsuite tool_dataprivacy_testsuite --filter metadata_registry_test
- . check vendor/bin/phpunit --fail-on-risky --disallow-test-output --filter test_all_external_info
- . check vendor/bin/phpunit --fail-on-risky --disallow-test-output --testsuite core_privacy_testsuite --filter provider_test
- . check moodle-plugin-ci phpunit --coverage-text --fail-on-warning
- . check-finish
except:
- tags
behat:
script:
- php -S ${IPADDRESS}:8000 -t $CI_PROJECT_DIR/../moodle > /dev/null 2>&1 &
- php admin/tool/behat/cli/init.php --add-core-features-to-theme --parallel=3 --optimize-runs=@format_wplist
- . check-start
- . check moodle-plugin-ci behat --suite workplace --profile chrome
- . check-finish
except:
- master
- tags
- /^WORKPLACE_\d+$/
.scriptshorttest: &scriptshorttest
script:
- . prepare-workplace $cibot_sshkey
- cd $CI_PROJECT_DIR/..
- |
if [ "$CLONEWPPLUGINS" == "1" ]; then
moodle-plugin-ci add-plugin --clone [email protected]:workplace/moodle-theme_workplace.git --branch $MOODLE_BRANCH
moodle-plugin-ci add-plugin --clone [email protected]:workplace/moodle-tool_wp.git --branch $MOODLE_BRANCH
moodle-plugin-ci add-plugin --clone [email protected]:workplace/moodle-tool_tenant.git --branch $MOODLE_BRANCH
fi
- if [ "$INCLUDERB" == "1" ]; then moodle-plugin-ci add-plugin --clone [email protected]:workplace/moodle-tool_reportbuilder.git --branch $MOODLE_BRANCH ; fi
- moodle-plugin-ci install --db-host="$DB_HOST" --no-init -vvv
- cd moodle
- php admin/tool/phpunit/cli/init.php
- php admin/tool/phpunit/cli/util.php --buildcomponentconfigs
- php -S ${IPADDRESS}:8000 -t $CI_PROJECT_DIR/../moodle > /dev/null 2>&1 &
- php admin/tool/behat/cli/init.php --add-core-features-to-theme --parallel=3 --optimize-runs=@format_wplist
- . check-start
- . check moodle-plugin-ci phpunit --coverage-text --fail-on-warning
- . check moodle-plugin-ci behat --suite default --profile chrome
- . check-finish
wp402s:
before_script:
- export MOODLE_BRANCH=$MOODLE_BRANCH_WORKPLACE402S
- export CLONEWPPLUGINS=1
<<: *scriptshorttest
except:
- master
- tags
- /^WORKPLACE_\d+$/
wp401s:
before_script:
- export MOODLE_BRANCH=$MOODLE_BRANCH_WORKPLACE401S
- export CLONEWPPLUGINS=1
<<: *scriptshorttest
except:
- master
- tags
- /^WORKPLACE_\d+$/
wp400:
before_script:
- export MOODLE_BRANCH=$MOODLE_BRANCH_WORKPLACE400
- export CLONEWPPLUGINS=1
- export INCLUDERB=1
<<: *scriptshorttest
except:
- master
- tags
- /^WORKPLACE_\d+$/
lms400:
before_script:
- export MOODLE_REPO=$MOODLE_REPO_LMS
- export MOODLE_BRANCH=$MOODLE_BRANCH_LMS400
<<: *scriptshorttest
except:
- master
- tags
lms401:
before_script:
- export MOODLE_REPO=$MOODLE_REPO_LMS
- export MOODLE_BRANCH=$MOODLE_BRANCH_LMS401
<<: *scriptshorttest
except:
- master
- tags
lms402:
before_script:
- export MOODLE_REPO=$MOODLE_REPO_LMS
- export MOODLE_BRANCH=$MOODLE_BRANCH_LMS402
<<: *scriptshorttest
except:
- master
- tags