forked from ensdomains/ens-app
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
90 lines (83 loc) · 2.06 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
89
90
sudo: required
services:
- docker
- postgresql
language: node_js
node_js:
- 14
dist: focal
cache:
yarn: true
directories:
# we also need to cache folder with Cypress binary
- ~/.cache/Cypress
matrix:
allow_failures:
#
jobs:
include:
- stage: test
name: 'Cypress Tests'
install:
- yarn --frozen-lockfile
- yarn global add [email protected]
- cypress install
- yarn global add [email protected]
- yarn global add wait-on
before_script:
- sudo service postgresql stop
- sudo apt-get install libsecret-1-dev
- ganache-cli -h 0.0.0.0 -b 1 >ganache.log 2>&1 &
- sleep 5
- cd ../ && git clone https://github.com/ensdomains/ens-subgraph.git
- cd ens-subgraph && yarn && cd ../
- git clone https://github.com/ensdomains/graph-node
- pwd
- ls graph-node/docker
- cd graph-node/docker && ./setup.sh
- rm -rf data
- docker-compose up 2>&1 > ~/docker-compose.log &
- DOCKER_PATH=`pwd`
- ls ~/docker-compose.log
- sleep 120
- cd ../../
- cd ens-app && yarn preTest && yarn subgraph && cd ../
- pwd
- ls -ltr ~
- cd ens-subgraph && (yarn setup || cat ~/docker-compose.log ) && cd ../
script:
- pwd
- ls
- cd ens-app && yarn cypress:ci && cd ../
- stage: test
name: 'Unit Tests'
install:
- yarn --frozen-lockfile
script:
- yarn test:coverage
- stage: test
name: 'Branch Preview'
install:
- yarn install
script:
- npm run build
- npm run postbuild
- pwd
- ls
- surge build "$TRAVIS_BRANCH"-ensdev.surge.sh
- stage: test
name: 'Cleanup Previews'
install:
- yarn add surge
script:
- ./surgeGarbageCollect.js
- stage: deploy
name: 'Deploy to live'
script: yarn deploy
stages:
- name: test
if: branch != master
- name: deploy
if: branch = master
notifications:
email: false