-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
73 lines (63 loc) · 2.29 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
language: node_js
node_js: 12.18.4
addons:
apt:
update: true
chrome: stable
bundler_args: "--jobs=4 --retry=3"
before_install:
- sudo apt-get install -y libsecret-1-dev curl
# Fixes an issue where the max file watch count is exceeded, triggering ENOSPC
# https://stackoverflow.com/questions/22475849/node-js-error-enospc#32600959
- echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
- export COVERALLS_SERVICE_JOB_ID=$( TRAVIS_JOB_ID )
- export COVERALLS_SERVICE_NAME="travis-ci"
jobs:
include:
- stage: tests
name: "Unit tests"
script:
- docker -v
- docker-compose -v
# fail on error
# - set -e
- echo 'docker-compose build' && echo -en 'travis_fold:start:script.1\\r'
- docker-compose build
- echo -en 'travis_fold:end:script.1\\r'
- echo 'docker-compose up -d' && echo -en 'travis_fold:start:script.2\\r'
- docker-compose up -d
- echo -en 'travis_fold:end:script.2\\r'
# wait for alchemy (the slowest latest process to respond
- bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' 127.0.0.1:3000)" != "200" ]]; do sleep 5; done'
# prin the status of the services
- npm run service-status
# show the daos that are indexed
- ./scripts/checkDaos.sh
- echo -en 'travis_fold:end:script.4\\r'
# unit tests
- npm run test:unit -- --forceExit
# run coverage report
- docker-compose logs alchemy || true
# run integration tests
- npm run test:integration:headless
# get some diagnostic info fo debugging travis
- echo 'Debug info:' && echo -en 'travis_fold:start:script.3\\r'
- npm run service-status
- docker-compose logs alchemy || true
- echo -en 'travis_fold:end:script.3\\r'
- ./scripts/checkDaos.sh
# see if the app builds correctly
- echo 'npm run build-travis' && echo -en 'travis_fold:start:script.4\\r'
- npm run build-travis
- echo -en 'travis_fold:end:script.4\\r'
- stage: tests
name: "ts/es lint"
script: npm run lint
deploy:
provider: pages
skip-cleanup: true
github-token: $GITHUB_TOKEN
keep-history: true
local-dir: dist
on:
branch: master