Skip to content

Commit 67cdcf7

Browse files
committed
unifying build scripts
1 parent 74704df commit 67cdcf7

File tree

3 files changed

+42
-25
lines changed

3 files changed

+42
-25
lines changed

.travis.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
1-
language: ruby
1+
language:
2+
- ruby
3+
24
rvm:
3-
- 2.1.1
5+
- 2.3.1
46

57
before_install:
6-
# Install Testspace Runner
7-
- ./testspace_install.sh
8-
- export PATH="${HOME}/testspace:${PATH}"
9-
- gem install bundler
108
- "export DISPLAY=:99.0"
119
- "sh -e /etc/init.d/xvfb start"
1210
- sleep 3 # give xvfb some time to start
1311

1412
script:
15-
- COVERAGE=true bundle exec rake ci:setup:rspec spec
13+
- gem install bundler
14+
- bundle exec rubocop --format emacs --out tmp/rubocop.txt || true
15+
- bundle exec brakeman -o tmp/brakeman.json
16+
- bundle exec brakeman_translate_checkstyle_format translate --file="tmp/brakeman.json" > tmp/brakeman_checkstyle.xml
1617

17-
# Publish Test Results along with Coverage
18-
- testspace publish [Tests]spec/reports/*.xml{spec} coverage/coverage.xml ${TESTSPACE_URL}
18+
- export CI_REPORTS=$PWD/spec/reports
19+
- COVERAGE=true bundle exec rake ci:setup:rspec spec
20+
21+
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
22+
- testspace publish @.testspace $TESTSPACE_TOKEN/${TRAVIS_BRANCH}#travis.Build.${TRAVIS_BUILD_NUMBER}

circle.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
machine:
2+
ruby:
3+
version: 2.3.1
4+
5+
test:
6+
override:
7+
- bundle install
8+
- bundle exec rubocop --format emacs --out tmp/rubocop.txt || true
9+
- bundle exec brakeman -o tmp/brakeman.json
10+
- bundle exec brakeman_translate_checkstyle_format translate --file="tmp/brakeman.json" > tmp/brakeman_checkstyle.xml
11+
12+
- export CI_REPORTS=$CIRCLE_TEST_REPORTS
13+
- RAILS_ENV=test COVERAGE=true bundle exec rake ci:setup:rspec spec
14+
15+
post:
16+
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
17+
- testspace publish @.testspace $TESTSPACE_TOKEN/${CIRCLE_BRANCH}#circle.Build.${CIRCLE_BUILD_NUM}

shippable.yml

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
11
language: ruby
22

33
rvm:
4-
- "2.1.1"
4+
- "2.3.1"
55

66
env:
77
global:
88
- DISPLAY=localhost:1.0
9-
- secure: JBy36n/1p9Rq+gVKEFhG/ZoLx4kqSBWQ7/GZVvIqwbpIupVrcoPMWompuijNRx1zOmXpRCZBwSEaMZn5P4ZPGEpdOtJrIt6ePAS2VUeH8ojYrv1uY8jCrpYfe5NAjcvCTl6DsloGsY8r3SdY7gx6/3XmkxvNfsD5u7j08Cw5sGapsSh08ndajQr8HyOTFQCAJhVH7PsoZLd4F5hRHNSPPRWbJ26vuBobmNEyZvDbYdJVyFEetclkA4cs5f82HYV9T5T8RRS5nSPzaEsQ6mniPtM6G74a3D4AM5CrnfmQk1RcWMJJu6oHbg2hMXoZWu7yPgVfAashP1zApwdNSdg04A==
9+
- secure: DNzaZMM7AN9FZOHnd7TslhOPM/DuogIr4bzbkMWde6GhKUslTGcjodpS/G8FUm7oIlP13ZM/yTN3dNw1Koy+1c6515gLh6b3Z1x0FpKNWN6401jPJCleZGo6yXa//hfqN0L1lt1rVEHzuxu+6d5gPA35aQRhELF4N1t9Gnry1vSFB8mLYg0ro47SvyDRk1e9faNXyjPTr9az3CKDF9jR/F3PPveF1zbGWO0ko06+XBBJbt3pT3G5mzoz2gnNyR81aD0hLQQgx5J0uuhmqMsaomYBLsI+176eP8Ax8jOpxs1rkC5528a0NxxTFvyNvdAeX0CsIVc1+gJkXwR1k2g6Vw==
1010

1111
addons:
12-
firefox: "29.0"
12+
firefox: "46.0"
1313

1414
services:
1515
- selenium
1616

17-
before_install:
18-
- ./testspace_install.sh
19-
- export PATH="${HOME}/testspace:${PATH}"
20-
- gem install bundler
17+
script:
18+
- bundle install
19+
- bundle exec rubocop --format emacs --out tmp/rubocop.txt || true
20+
- bundle exec brakeman -o tmp/brakeman.json
21+
- bundle exec brakeman_translate_checkstyle_format translate --file="tmp/brakeman.json" > tmp/brakeman_checkstyle.xml
2122

22-
before_script:
23-
- mkdir -p shippable/codecoverage
24-
- mkdir -p shippable/testresults
23+
- export CI_REPORTS=$PWD/spec/reports
24+
- COVERAGE=true xvfb-run --server-args="-screen 0 1024x768x24" bundle exec rake ci:setup:rspec spec
2525

26-
script:
27-
- testspace import .testspace.xml $TESTSPACE_URL
28-
- xvfb-run --server-args="-screen 0 1024x768x24" testspace run $TESTSPACE_URL
26+
- curl -s https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | sudo tar -zxvf- -C /usr/local/bin
27+
- testspace publish @.testspace $TESTSPACE_TOKEN/${BRANCH}#ship.Build.${BUILD_NUMBER}
2928

30-
after_script:
31-
- cp spec/reports/*.xml shippable/testresults
32-
- cp coverage/coverage.xml shippable/codecoverage

0 commit comments

Comments
 (0)