-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
48 lines (43 loc) · 1.51 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
---
sudo: required
dist: trusty
install:
# Update docker-engine using Ubuntu 'trusty' apt repo
- >
curl -sSL "https://get.docker.com/gpg" |
sudo -E apt-key add -
- >
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" |
sudo tee -a /etc/apt/sources.list
- sudo apt-get update
- >
sudo apt-get -o Dpkg::Options::="--force-confdef" \
-o Dpkg::Options::="--force-confold" --assume-yes install docker-engine \
--allow-unauthenticated
- docker version
# Update docker-compose via pip
- sudo pip install docker-compose
- docker-compose version
before_cache:
# Save tagged docker images
- >
mkdir -p $HOME/docker && docker images -a --filter='dangling=false' --format '{{.Repository}}:{{.Tag}} {{.ID}}'
| xargs -n 2 -t sh -c 'test -e $HOME/docker/$1.tar.gz || docker save $0 | gzip -2 > $HOME/docker/$1.tar.gz'
cache:
directories:
- $HOME/docker
before_install:
# Load cached docker images
- if [[ -d $HOME/docker ]]; then ls $HOME/docker/*.tar.gz | xargs -I {file} sh -c "zcat {file} | docker load"; fi
before_script:
- cd docker
- touch ./compose/.env
- chmod +x ../travis.test.sh
- docker-compose down
- docker-compose -f ./docker-compose.electron.yaml build
- docker-compose -f ./docker-compose.electron.yaml up
- sudo chmod 777 -R ./compose/app/.build
- cp ./compose/app/.build/electron/desktop.js ./compose/app/.build/public/main.js
- cp ./compose/app/src/package.json ./compose/app/.build/public
script:
- ../travis.test.sh