-
Notifications
You must be signed in to change notification settings - Fork 55
/
.travis.yml
42 lines (35 loc) · 1.16 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
language: ruby
env:
global:
- CC_TEST_REPORTER_ID=754ef1da9d8f9c514b6f9a97c92620c9f7e3bcd5df21e5792cee16e57bcd6c4b
- COMMIT=${TRAVIS_COMMIT::8}
rvm:
- 2.2
- 2.3
- 2.4
- 2.5
services:
- docker
sudo: required
before_install:
- gem install bundler -v 1.16.4
- sudo service mysql stop
- docker --version
- docker-compose --version
- docker-compose -f dev/travis/docker-compose.mysql.yml up -d
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- RUBY_VERSION=$(ruby -v | awk '{print $2}' | sed "s/-.*//" | grep -o "^[^\.]*\.\?[^\.]*")
- cp config/env/sample.yml config/env/development.yml
- bundle exec rubocop
- bundle exec rspec spec
- ls -aln
- sudo chown -R 1000:1000 .
- ls -aln
- docker build -t divante/anonymizer:${RUBY_VERSION}_${COMMIT} -f dev/docker/ruby$RUBY_VERSION/anonymizer/Dockerfile .
- docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
- docker push divante/anonymizer:${RUBY_VERSION}_${COMMIT};
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT