Skip to content

Commit ff658f5

Browse files
authored
Codeship (#4)
* Add Codeship CI Pro to sample * DockerFile with Testspace install * Codeship yml files * run_analysis.sh script for executing lint steps in Codeship.
1 parent 5308544 commit ff658f5

File tree

6 files changed

+37
-1
lines changed

6 files changed

+37
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ language:
33

44
rvm:
55
- 2.3.1
6-
6+
77
before_script:
88
- mkdir -p $HOME/bin
99
- curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM ruby:2.3.4
2+
3+
RUN apt-get update && apt-get install -y nodejs
4+
RUN mkdir -p /app
5+
WORKDIR /app
6+
7+
RUN gem install bundler
8+
9+
COPY Gemfile Gemfile.lock ./
10+
11+
RUN bundle install
12+
13+
COPY . ./
14+
15+
ARG TESTSPACE_TOKEN
16+
17+
RUN curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux-dev.tgz | tar -zxvf- -C /usr/local/bin
18+
RUN testspace config url ${TESTSPACE_TOKEN}:@samples.testspace.com/

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Using Multiple Online CI Services:
1818
[![Build Status](https://travis-ci.org/testspace-samples/ruby.minitest.svg?branch=master)](https://travis-ci.org/testspace-samples/ruby.minitest)
1919
[![CircleCI](https://circleci.com/gh/testspace-samples/ruby.minitest/tree/master.svg?style=svg)](https://circleci.com/gh/testspace-samples/ruby.minitest/tree/master)
2020
[![Run Status](https://api.shippable.com/projects/5703dabb2a8192902e1b99ce/badge?branch=master)](https://app.shippable.com/projects/5703dabb2a8192902e1b99ce)
21+
[ ![Codeship Status](https://app.codeship.com/projects/eb40a080-6412-0135-6105-4ab105608534/status?branch=master)](https://app.codeship.com/projects/240271)
2122

2223

2324
***

codeship-services.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
testspace_sample:
2+
build:
3+
image: ruby:2.3.4
4+
dockerfile: Dockerfile
5+
encrypted_args: egYblDOciD4mOvWkp2DvK2WuptuFRTPddcuXcRIp+4Mo3J5um3gpQRXSh1xFTtC4oYKDzh3wcrpjautR6rWg5e6mxSWYx5hn

codeship-steps.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
- type: parallel
2+
services:
3+
- testspace_sample
4+
steps:
5+
- command: testspace [Tests]./test/reports/TEST*.xml{test} coverage/coverage.xml --command "bundle exec rake minitest test"
6+
- command: testspace tmp/rubocop.txt{lint} tmp/brakeman_checkstyle.xml tmp/scss-lint.txt{lint} --command "sh run_analysis.sh"

run_analysis.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
bundle exec rubocop --format emacs --out tmp/rubocop.txt
4+
bundle exec scss-lint --no-color --format=Stats --format=Default --out=tmp/scss-lint.txt app/assets/stylesheets/
5+
bundle exec brakeman -o tmp/brakeman.json
6+
bundle exec brakeman_translate_checkstyle_format translate --file="tmp/brakeman.json" > tmp/brakeman_checkstyle.xml

0 commit comments

Comments
 (0)