2020-02-04 12:47:21 +00:00
|
|
|
os: linux
|
2020-01-13 14:45:53 +00:00
|
|
|
dist: bionic
|
2018-08-23 13:28:06 +00:00
|
|
|
group: edge
|
|
|
|
language: node_js
|
2019-04-26 09:08:14 +00:00
|
|
|
node_js: 11
|
2020-05-01 10:16:21 +00:00
|
|
|
php: 7.1
|
2019-01-29 15:07:53 +00:00
|
|
|
|
2020-04-28 11:29:17 +00:00
|
|
|
android:
|
|
|
|
components:
|
|
|
|
- tools
|
|
|
|
- platform-tools
|
|
|
|
- build-tools-29.0.3
|
|
|
|
- android-28
|
|
|
|
- extra-google-google_play_services
|
|
|
|
- extra-google-m2repository
|
|
|
|
- extra-android-m2repository
|
|
|
|
|
|
|
|
git:
|
|
|
|
depth: 3
|
|
|
|
|
2019-01-29 15:07:53 +00:00
|
|
|
before_cache:
|
2020-04-28 11:29:17 +00:00
|
|
|
- rm -f $HOME/.gradle/caches/modules-2/modules-2.lock
|
|
|
|
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
|
2019-01-29 15:07:53 +00:00
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
2019-05-28 13:06:43 +00:00
|
|
|
- $HOME/.npm
|
2020-04-28 11:29:17 +00:00
|
|
|
- $HOME/.gradle/caches/
|
|
|
|
- $HOME/.gradle/wrapper/
|
|
|
|
- $HOME/.android/build-cache
|
2018-08-23 13:28:06 +00:00
|
|
|
|
|
|
|
before_script:
|
2020-12-01 13:07:16 +00:00
|
|
|
- npm install npm@latest -g
|
2018-08-23 13:28:06 +00:00
|
|
|
- gulp
|
|
|
|
|
2020-04-28 11:29:17 +00:00
|
|
|
jobs:
|
|
|
|
include:
|
|
|
|
- stage: check
|
2020-05-05 06:48:43 +00:00
|
|
|
if: NOT branch =~ /(master|integration|desktop)$/ AND env(DEPLOY) IS blank
|
2020-04-28 11:29:17 +00:00
|
|
|
script: npm run build --bailOnLintError true --typeCheckOnLint true
|
|
|
|
- stage: mirror
|
2020-06-16 15:32:05 +00:00
|
|
|
if: branch IN (master, integration, desktop) AND repo = moodlehq/moodleapp AND type != cron
|
2020-04-28 11:29:17 +00:00
|
|
|
script: scripts/mirror.sh
|
|
|
|
- stage: prepare
|
2020-12-01 13:07:16 +00:00
|
|
|
if: branch =~ /(master|^integration)$/ AND env(PREPARE) IS present AND env(PREPARE) = 1 AND type != cron AND tag IS blank
|
2020-04-28 11:29:17 +00:00
|
|
|
script: scripts/aot.sh
|
|
|
|
- stage: build
|
|
|
|
name: "Build Android"
|
2020-12-01 13:07:16 +00:00
|
|
|
if: env(DEPLOY) IS present AND type != cron AND ((env(DEPLOY) = 1 AND tag IS blank) OR (env(DEPLOY) = 2 AND tag IS present))
|
2020-04-28 11:29:17 +00:00
|
|
|
dist: trusty
|
|
|
|
language: android
|
2020-05-05 06:48:43 +00:00
|
|
|
env:
|
|
|
|
- BUILD_PLATFORM='android'
|
2020-04-28 11:29:17 +00:00
|
|
|
before_install:
|
|
|
|
- nvm install 11
|
|
|
|
- node --version
|
|
|
|
- npm --version
|
|
|
|
- nvm --version
|
|
|
|
- npm ci
|
|
|
|
- npm install -g gulp
|
|
|
|
script: scripts/aot.sh
|
2020-06-11 14:40:20 +00:00
|
|
|
- stage: test
|
2020-12-03 12:54:28 +00:00
|
|
|
name: "End to end tests (mod_forum and mod_messages)"
|
2020-06-11 14:40:20 +00:00
|
|
|
services:
|
|
|
|
- docker
|
2020-06-16 09:05:33 +00:00
|
|
|
if: type = cron
|
2020-12-03 12:54:28 +00:00
|
|
|
script: scripts/test_e2e.sh "@app&&@mod_forum" "@app&&@mod_messages"
|
2020-06-11 14:40:20 +00:00
|
|
|
- stage: test
|
2020-12-03 12:54:28 +00:00
|
|
|
name: "End to end tests (mod_data and mod_survey)"
|
2020-06-11 14:40:20 +00:00
|
|
|
services:
|
|
|
|
- docker
|
2020-06-16 09:05:33 +00:00
|
|
|
if: type = cron
|
2020-12-03 12:54:28 +00:00
|
|
|
script: scripts/test_e2e.sh "@app&&@mod_data" "@app&&@mod_survey"
|
|
|
|
- stage: test
|
|
|
|
name: "End to end tests (mod_comments, mod_course, core_course and mod_courses)"
|
|
|
|
services:
|
|
|
|
- docker
|
|
|
|
if: type = cron
|
|
|
|
script: scripts/test_e2e.sh "@app&&@mod_comments" "@app&&@mod_course" "@app&&@core_course" "@app&&@mod_courses"
|
2020-06-11 14:40:20 +00:00
|
|
|
- stage: test
|
|
|
|
name: "End to end tests (others)"
|
|
|
|
services:
|
|
|
|
- docker
|
2020-06-16 09:05:33 +00:00
|
|
|
if: type = cron
|
2020-06-11 14:40:20 +00:00
|
|
|
script: scripts/test_e2e.sh "@app&&~@mod_forum&&~@mod_messages&&~@mod_comments&&~@mod_data&&~@mod_survey&&~@mod_course&&~@core_course&&~@mod_courses"
|