forked from theia-ide/theia-apps
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
88 lines (75 loc) · 2.8 KB
/
.travis.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
services:
- docker
git:
depth: 2
branches:
only:
- master
language: node_js
node_js: "10"
addons:
apt:
update: true
sources:
- ubuntu-toolchain-r-test
packages: libxkbfile-dev
chrome: stable
env:
- NPM_TAG=latest IMAGE_NAME=theia-full NODE_VERSION=12.18.3
- NPM_TAG=next IMAGE_NAME=theia-full NODE_VERSION=12.18.3
- NPM_TAG=latest IMAGE_NAME=theia NODE_VERSION=12.18.3
- NPM_TAG=next IMAGE_NAME=theia NODE_VERSION=12.18.3
- NPM_TAG=latest IMAGE_NAME=theia-go NODE_VERSION=12.18.3
- NPM_TAG=next IMAGE_NAME=theia-go NODE_VERSION=12.18.3
- NPM_TAG=latest IMAGE_NAME=theia-python NODE_VERSION=12.18.3
- NPM_TAG=next IMAGE_NAME=theia-python NODE_VERSION=12.18.3
- NPM_TAG=latest IMAGE_NAME=theia-swift NODE_VERSION=12
- NPM_TAG=next IMAGE_NAME=theia-swift NODE_VERSION=12
- NPM_TAG=latest IMAGE_NAME=theia-cpp NODE_VERSION=12.18.3
- NPM_TAG=next IMAGE_NAME=theia-cpp NODE_VERSION=12.18.3
- NPM_TAG=next IMAGE_NAME=theia-rust NODE_VERSION=12.18.3
- NPM_TAG=latest IMAGE_NAME=theia-dart NODE_VERSION=12
- NPM_TAG=next IMAGE_NAME=theia-dart NODE_VERSION=12
- NPM_TAG=latest IMAGE_NAME=theia-https NODE_VERSION=12.18.3 ENV_VARS="-e token=" PORT=10443
- NPM_TAG=next IMAGE_NAME=theia-https NODE_VERSION=12.18.3 ENV_VARS="-e token=" PORT=10443
- NPM_TAG=latest IMAGE_NAME=theia-php NODE_VERSION=12.18.3
- NPM_TAG=next IMAGE_NAME=theia-php NODE_VERSION=12.18.3
jobs:
# add installer builds to jobs matrix
include:
- &publish
env:
node_js: 12
install: skip
script: cd theia-electron && yarn && travis_wait 30 yarn package
- <<: *publish
os: osx
- <<: *publish
os: windows
before_install:
- npm install -g yarn eclint
- eclint check "**/*" || echo "Warning! Formatting errors encountered..."
install:
# this makes it possible to see output of the docker build as it unfolds:
# from https://stackoverflow.com/questions/43918874/how-to-increase-no-activity-wait-time-in-travis-ci
- "travis_wait 30 sleep 1800 &"
# check if there were changes since the previous commit in this image
# if not (script returns 137) then the build process is terminated
- ./check_changed.sh $IMAGE_NAME ; RETURN_CODE=$? ; if [ $RETURN_CODE -eq 137 ]; then travis_terminate 0; elif [ $RETURN_CODE -ne 0 ]; then travis_terminate $RETURN_CODE; fi
- ./build_container.sh $NPM_TAG $IMAGE_NAME $NODE_VERSION $PORT $ENV_VARS
script: cd tests; yarn; yarn test-app-$IMAGE_NAME
after_failure:
script: cd $TRAVIS_BUILD_DIR && ./commit_screenshots.sh
before_deploy:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
deploy:
provider: script
script: docker push "theiaide/$IMAGE_NAME"
on:
branch: master
condition: $IMAGE_NAME
skip_cleanup: true
notifications:
on_success: change
on_failure: always
on_start: never