Skip to content

Commit f8dfcd7

Browse files
authored
add github workflow (#4)
* add github workflow * use selenium-webdriver 3.14.0 * update firefox * install geckodriver
1 parent 7d9c07f commit f8dfcd7

File tree

7 files changed

+61
-71
lines changed

7 files changed

+61
-71
lines changed

.c9build.sh

Lines changed: 0 additions & 23 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Build
2+
on:
3+
push:
4+
schedule:
5+
- cron: '0 1 * * 0'
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-18.04
10+
steps:
11+
- uses: ruby/setup-ruby@v1
12+
with:
13+
ruby-version: '2.3'
14+
- uses: actions/checkout@v2
15+
with:
16+
fetch-depth: 50
17+
- uses: testspace-com/setup-testspace@v1
18+
with:
19+
domain: samples
20+
- uses: actions/cache@v2
21+
with:
22+
path: vendor/bundle
23+
key: ${{ runner.os }}-gems-${{ hashFiles('Gemfile.lock') }}
24+
restore-keys: |
25+
${{ runner.os }}-gems-
26+
- name: Install
27+
run: |
28+
bundle install --deployment --retry=3 --jobs=4
29+
RAILS_ENV=test bundle exec rake db:migrate
30+
- name: Analyze
31+
run: |
32+
bundle exec rubocop --format emacs --out tmp/rubocop.txt || true
33+
bundle exec brakeman -o tmp/brakeman.json
34+
bundle exec brakeman_translate_checkstyle_format translate --file="tmp/brakeman.json" > tmp/brakeman_checkstyle.xml
35+
- name: Test
36+
run: |
37+
CI_REPORTS=spec/reports RAILS_ENV=test COVERAGE=true xvfb-run --server-args="-screen 0 1024x768x24" bundle exec rake ci:setup:rspec spec
38+
- name: Push
39+
run: |
40+
testspace @.testspace.txt
41+
if: always()

.travis.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
1-
dist: xenial
1+
dist: bionic
22

3-
language:
3+
language:
44
- ruby
55
rvm:
66
- 2.3
77

88
services:
99
- xvfb
1010
addons:
11-
firefox: "45.0"
12-
11+
firefox: "latest"
12+
apt:
13+
packages:
14+
firefox-geckodriver
15+
1316
before_script:
1417
- mkdir -p $HOME/bin
1518
- curl -fsSL https://testspace-client.s3.amazonaws.com/testspace-linux.tgz | tar -zxvf- -C $HOME/bin
1619
- testspace config url samples.testspace.com
17-
20+
1821
script:
19-
- gem install bundler
2022
- bundle exec rubocop --format emacs --out tmp/rubocop.txt || true
2123
- bundle exec brakeman -o tmp/brakeman.json
2224
- bundle exec brakeman_translate_checkstyle_format translate --file="tmp/brakeman.json" > tmp/brakeman_checkstyle.xml
2325
- COVERAGE=true bundle exec rake ci:setup:rspec spec
24-
25-
after_script:
26+
27+
after_script:
2628
- CI_REPORTS=$PWD/spec/reports testspace @.testspace.txt

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ group :development, :test do
4848
gem 'ci_reporter_rspec'
4949
gem 'simplecov', :require => false
5050
gem 'simplecov-cobertura'
51-
51+
5252
# A Ruby static code analyzer.
5353
gem 'rubocop', :require => false
5454
# A static analysis security vulnerability scanner for Ruby on Rails.
@@ -63,7 +63,7 @@ group :test do
6363
gem "capybara", "~> 2.4.3"
6464
gem "database_cleaner", "~> 1.3.0"
6565
gem "launchy", "~> 2.4.2"
66-
gem "selenium-webdriver", "~> 2.53.4"
66+
gem "selenium-webdriver", "~> 3.14.0"
6767
gem 'shoulda-matchers', '~> 2.6.2'
6868
end
6969

Gemfile.lock

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,9 @@ GEM
190190
sdoc (0.4.2)
191191
json (~> 1.7, >= 1.7.7)
192192
rdoc (~> 4.0)
193-
selenium-webdriver (2.53.4)
193+
selenium-webdriver (3.14.0)
194194
childprocess (~> 0.5)
195-
rubyzip (~> 1.0)
196-
websocket (~> 1.0)
195+
rubyzip (~> 1.2)
197196
shellany (0.0.1)
198197
shoulda-matchers (2.6.2)
199198
activesupport (>= 3.0.0)
@@ -233,7 +232,6 @@ GEM
233232
uglifier (3.2.0)
234233
execjs (>= 0.3.0, < 3)
235234
unicode-display_width (1.3.0)
236-
websocket (1.2.4)
237235
xpath (2.1.0)
238236
nokogiri (~> 1.3)
239237

@@ -260,7 +258,7 @@ DEPENDENCIES
260258
rubocop
261259
sass-rails (~> 4.0.3)
262260
sdoc (~> 0.4.0)
263-
selenium-webdriver (~> 2.53.4)
261+
selenium-webdriver (~> 3.14.0)
264262
shoulda-matchers (~> 2.6.2)
265263
simplecov
266264
simplecov-cobertura

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ Sample demonstrates techniques for using Testspace with Ruby code and the [`rspe
88

99
* Using a Testspace Project that is `connected` with this GitHub Repo
1010
* Using 3 Online CI services for demonstration purposes only
11-
* Can review the Results at [testspace-samples:ruby.rspec](https://samples.testspace.com/projects/testspace-samples:ruby.rspec)
12-
* Refer to our [Getting Started](https://help.testspace.com/getting-started) help articles for more information
11+
* Can review the Results at [testspace-samples:ruby.rspec](https://samples.testspace.com/projects/testspace-samples:ruby.rspec)
12+
* Refer to our [Help](https://help.testspace.com/) for more information
1313

1414
***
1515
Using Multiple Online CI Services:
1616

17+
![Build](https://github.com/testspace-samples/ruby.rspec/workflows/Build/badge.svg)
1718
[![Build Status](https://travis-ci.org/testspace-samples/ruby.rspec.svg?branch=master)](https://travis-ci.org/testspace-samples/ruby.rspec)
1819
[![CircleCI](https://circleci.com/gh/testspace-samples/ruby.rspec.svg?style=svg)](https://circleci.com/gh/testspace-samples/ruby.rspec)
19-
[![Run Status](https://api.shippable.com/projects/5710e82e2a8192902e1c2199/badge?branch=master)](https://app.shippable.com/projects/5710e82e2a8192902e1c2199)
2020

2121

2222
***
@@ -27,7 +27,7 @@ Publishing **Test Content** using www.testspace.com.
2727
[![Space Metric](https://samples.testspace.com/spaces/726/metrics/659/badge?token=9cc9e80131a7f91629c83ea332f652c1a13bd66d)](https://samples.testspace.com/spaces/726/schema/Static%20Analysis "Static Analysis (issues)")
2828

2929
***
30-
Download and configure the Testspace client
30+
Download and configure the Testspace client
3131

3232
<pre>
3333
mkdir -p $HOME/bin
@@ -43,7 +43,7 @@ bundle install
4343
bundle exec rubocop --format emacs --out tmp/rubocop.txt
4444
bundle exec brakeman -o tmp/brakeman.json
4545
bundle exec brakeman_translate_checkstyle_format translate --file="tmp/brakeman.json" > tmp/brakeman_checkstyle.xml
46-
</pre>
46+
</pre>
4747

4848
Running Tests with Code Coverage:
4949

shippable.yml

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)