-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
102 lines (94 loc) · 3.38 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
image: moodlehq/moodle-workplace-plugin-ci:8.1
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_WORKPLACE404R: WORKPLACE_ROLLING_404
MOODLE_BRANCH_WORKPLACE403R: WORKPLACE_ROLLING_403
MOODLE_BRANCH_WORKPLACE403S: WORKPLACE_403
MOODLE_BRANCH_WORKPLACE402S: WORKPLACE_402
MOODLE_BRANCH_WORKPLACE401S: WORKPLACE_401
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"
.scriptshorttest: &scriptshorttest
script:
- . prepare-workplace $cibot_sshkey
- export PLUGINNAME=$(grep 'plugin->component' $CI_PROJECT_DIR/version.php | awk -F\' '{ print $2; }')
- cd $CI_PROJECT_DIR/..
- 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
- moodle-plugin-ci add-plugin --clone [email protected]:workplace/moodle-theme_workplace.git --branch $MOODLE_BRANCH
- moodle-plugin-ci install --db-host="$DB_HOST" -vvv
- php -S ${IPADDRESS}:8000 -t $CI_PROJECT_DIR/../moodle > /dev/null 2>&1 &
- cd moodle
- . check-start
- . check no_workplace_licenses
- . check this_plugin_is_part_of "the theme_wpchild 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 --testsuite core_external_testsuite --filter "test_all_external_info@${PLUGINNAME}.*"
- . 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 moodle-plugin-ci behat --suite wpchild --profile chrome
- . check-finish
except:
- tags
wp404r:
before_script:
- export MOODLE_BRANCH=$MOODLE_BRANCH_WORKPLACE404R
<<: *scriptshorttest
except:
- main
- tags
- /^WORKPLACE_\d+$/
wp403r:
before_script:
- export MOODLE_BRANCH=$MOODLE_BRANCH_WORKPLACE403R
<<: *scriptshorttest
except:
- main
- tags
- /^WORKPLACE_\d+$/
wp403s:
before_script:
- export MOODLE_BRANCH=$MOODLE_BRANCH_WORKPLACE403S
<<: *scriptshorttest
except:
- main
- tags
- /^WORKPLACE_\d+$/
wp402s:
before_script:
- export MOODLE_BRANCH=$MOODLE_BRANCH_WORKPLACE402S
<<: *scriptshorttest
except:
- main
- tags
- /^WORKPLACE_\d+$/
wp401s:
before_script:
- export MOODLE_BRANCH=$MOODLE_BRANCH_WORKPLACE401S
<<: *scriptshorttest
except:
- main
- tags
- /^WORKPLACE_\d+$/