Vmeda.Online/.travis.yml

129 lines
4.0 KiB
YAML
Raw Normal View History

os: linux
2020-01-13 14:45:53 +00:00
dist: bionic
group: edge
language: node_js
node_js: 11
2020-05-01 10:16:21 +00:00
php: 7.1
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
before_cache:
- rm -rf $HOME/.cache/electron-builder/wine
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/
cache:
directories:
- $HOME/.npm
- $HOME/.cache/electron
- $HOME/.cache/electron-builder
2020-04-28 11:29:17 +00:00
- $HOME/.gradle/caches/
- $HOME/.gradle/wrapper/
- $HOME/.android/build-cache
before_script:
2020-04-28 11:29:17 +00:00
- if [ "$TRAVIS_OS_NAME" != 'windows' ] ; then npm install npm@latest -g ; fi
- gulp
2020-04-28 11:29:17 +00:00
jobs:
include:
- stage: check
if: NOT branch =~ /(master|integration|desktop)$/ AND env(DEPLOY) IS blank
2020-04-28 11:29:17 +00:00
os: linux
script: npm run build --bailOnLintError true --typeCheckOnLint true
- stage: mirror
if: branch IN (master, integration, desktop) AND repo = moodlehq/moodleapp AND type != cron
2020-04-28 11:29:17 +00:00
os: linux
script: scripts/mirror.sh
- stage: prepare
if: branch =~ /(master|^integration)$/ AND env(PREPARE) IS NOT blank AND env(PREPARE) = 1 AND type != cron
2020-04-28 11:29:17 +00:00
os: linux
script: scripts/aot.sh
- stage: build
name: "Build Android"
if: env(DEPLOY) IS NOT blank AND ((env(DEPLOY) = 1 AND branch != desktop) OR (env(DEPLOY) IN (2,3) AND tag IS NOT blank))
2020-04-28 11:29:17 +00:00
os: linux
dist: trusty
group: edge
language: android
env:
- BUILD_PLATFORM='android'
2020-04-28 11:29:17 +00:00
before_install:
- nvm install 11
- node --version
- npm --version
- nvm --version
- sudo apt-get install -y libsecret-1-dev > /dev/null
2020-04-28 11:29:17 +00:00
- npm ci
- npm install -g gulp
script: scripts/aot.sh
- stage: build
name: "Build iOS"
if: env(DEPLOY) IS NOT blank AND ((env(DEPLOY) = 1 AND branch != desktop) OR (env(DEPLOY) IN (2,3) AND tag IS NOT blank))
2020-04-28 11:29:17 +00:00
os: osx
osx_image: xcode12u
env:
- BUILD_PLATFORM='ios'
2020-04-28 11:29:17 +00:00
script: scripts/aot.sh
- stage: build
name: "Build Linux"
2020-05-01 10:16:21 +00:00
if: env(DEPLOY) IS NOT blank AND ((env(DEPLOY) = 1 AND branch = desktop) OR (env(DEPLOY) = 3 AND tag IS NOT blank))
2020-04-28 11:29:17 +00:00
os: linux
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- BUILD_PLATFORM='linux'
before_install:
- sudo apt-get install -y libsecret-1-dev > /dev/null
2020-04-28 11:29:17 +00:00
script: scripts/aot.sh
- stage: build
name: "Build MacOS"
2020-05-01 10:16:21 +00:00
if: env(DEPLOY) IS NOT blank AND ((env(DEPLOY) = 1 AND branch = desktop) OR (env(DEPLOY) = 3 AND tag IS NOT blank))
2020-04-28 11:29:17 +00:00
os: osx
osx_image: xcode12u
2020-04-28 11:29:17 +00:00
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- BUILD_PLATFORM='osx'
2020-04-28 11:29:17 +00:00
script: scripts/aot.sh
- stage: build
name: "Build Windows"
2020-05-01 10:16:21 +00:00
if: env(DEPLOY) IS NOT blank AND ((env(DEPLOY) = 1 AND branch = desktop) OR (env(DEPLOY) = 3 AND tag IS NOT blank))
2020-04-28 11:29:17 +00:00
os: windows
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true
- DEBUG=electron-windows-store
- BUILD_PLATFORM='windows'
2020-04-28 11:29:17 +00:00
script: scripts/aot.sh
- stage: test
name: "End to end tests (mod_forum, mod_messages and mod_comments)"
services:
- docker
2020-06-16 09:05:33 +00:00
if: type = cron
script: scripts/test_e2e.sh "@app&&@mod_forum" "@app&&@mod_messages" "@app&&@mod_comments"
- stage: test
name: "End to end tests (mod_data, mod_survey, mod_course, core_course and mod_courses)"
services:
- docker
2020-06-16 09:05:33 +00:00
if: type = cron
script: scripts/test_e2e.sh "@app&&@mod_data" "@app&&@mod_survey" "@app&&@mod_course" "@app&&@core_course" "@app&&@mod_courses"
- stage: test
name: "End to end tests (others)"
services:
- docker
2020-06-16 09:05:33 +00:00
if: type = cron
script: scripts/test_e2e.sh "@app&&~@mod_forum&&~@mod_messages&&~@mod_comments&&~@mod_data&&~@mod_survey&&~@mod_course&&~@core_course&&~@mod_courses"