-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
75 lines (73 loc) · 2.62 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
notifications:
email: false
git:
quiet: true
depth: false
language: node
node_js: lts/*
python: 3.8
service: docker
os: linux
arch: amd64
addons:
apt:
update: true
packages:
- curl
- sudo
- lsof
- httpie
- docker-ce
install: true
before_install:
- export DISPLAY=:99.0
- |
if [ ! -f ${HOME}/.local/daggerok/bash-functions/master/main.bash ] ; then
mkdir -p ${HOME}/.local/daggerok/bash-functions/master ;
curl -s https://raw.githubusercontent.com/daggerok/bash-functions/master/main.bash > ${HOME}/.local/daggerok/bash-functions/master/main.bash ;
fi
source ${HOME}/.local/daggerok/bash-functions/master/main.bash ;
- stop_any 80 3000 5000 8080 5432
cache:
npm: true
apt: true
packages: true
directories:
- ~/.local/daggerok
jobs:
include:
- stage: test
name: integration tests
before_script:
- cd $TRAVIS_BUILD_DIR && npm i
- cd $TRAVIS_BUILD_DIR && npm run generate
- docker run -d --rm --name app -p 80:80 -v $TRAVIS_BUILD_DIR/dist:/usr/share/nginx/html:ro
--health-cmd="wget -q --spider http://127.0.0.1:80/ || exit 1"
--health-start-period=1s
--health-interval=1s
--health-retries=33
--health-timeout=1s
nginx:1.17.6-alpine
- wait_healthy_docker_containers 1
script: http :/
after_script: docker rm -f -v app
- stage: deploy
name: build and deploy
script: skip
jdk: openjdk8
before_deploy:
- cd $TRAVIS_BUILD_DIR && npm i
- cd $TRAVIS_BUILD_DIR && npm run predeploy
env:
- secure: "YmAvyEXtNDf3HqxMzPdR06A0IgSPG15nhwxiVkw0/jNTIVcRv4nVA7uVzsr56l4lFTMY7MrZbTZnpfK5Bm9xl9vE0zgODc23tEOEV9BWJnQrGhRMPBe8FuwgCUckrmfPPJaKnYBNCvX+AVWvqtLV5g29j+TzoV8rASnjcP5tvOy42+VfTUUHsEfrG27lvcZeBC5mycm1Sj95LTp25Ln9eMisIzP2LhOBqGlhO17FTnvw+xUUn/WERtNQ8UXJghIrFiCNy9oWkpm/9j0un+GKwUg5Ch2Bva43IIwX7a5Rfk4wdF17ONcHVfYusqxVAvgelxBnv6VMDVHIhQ4Huytg7rdcS4cM5pUuPU60+uwj48Bp+4Irr0rMYEUnAtUYpztAQscmk9/V1BqugcGD/lCRlWthXdQOZfo6Dp9C125p/yBUQqnzu5OVYy57FdDvgxkDtmR1f28GYkkdk84YpfiOJHmhyCNnApCBouGuArW0RoiBskeuGa1hbcAQk4JyAk29+YLIBXYJ2QRrZHDEfquXHEQznt5QV4gxMDL0b068faiNSOiin1zSau/HYhHO29fFnQaJIvkDQsgx9/atVYstsXJQ73TM0bGuUTLleMbWyE18aOZyYOObrqQYZYn8PbtJl24tke55rjrYgPq/ckcfNtZIAAbA5dIjbQPCNlE+P84="
deploy: &pages
provider: pages
skip-cleanup: true
keep-history: true
target_branch: gh-pages
# travis encrypt GITHUB_TOKEN=<your github repo token> --add
github-token: "$GITHUB_TOKEN"
local-dir: $TRAVIS_BUILD_DIR/dist
on:
all_branches: true
#condition: $TRAVIS_BRANCH =~ ^(master|ci)$