-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
37 lines (31 loc) · 1.14 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
sudo: required
language: ruby
rvm:
- 2.5.1
- 2.4.4
- 2.3.7
services:
- docker
env:
global:
- CC_TEST_REPORTER_ID=b00629b7f1881b82d80ac91936952aafcab22ef79b2153c4df0fe23640da2589
before_install:
- env
- docker-compose --version
- docker --version
- docker-compose config
- docker-compose build backend
- docker-compose build frontend
before_script:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter before-build || echo "Skipping CC coverage before-build"; fi
- mkdir coverage/
- touch ./coverage/.resultset.json
script:
- docker-compose run --rm backend rspec
- docker-compose run --rm frontend npm run test:unit
after_script:
- cat ./coverage/.resultset.json | sed "s|/opt/phobos_checkpoint_ui|$PWD|" > ./coverage/.newresultset.json
- cp ./coverage/.newresultset.json ./coverage/.resultset.json
- if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT || echo "Skipping CC coverage after-build"; fi