Skip to content

Commit f33ec10

Browse files
Implements Github Actions
Specifically: - Adds simplecov and simplecov-lcov gems - Removes coveralls gem - Removes .travis.yml - Adjusts test_helper accordingly
1 parent 5b68f1f commit f33ec10

File tree

5 files changed

+45
-24
lines changed

5 files changed

+45
-24
lines changed

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
on:
3+
push:
4+
branches: [ master ]
5+
pull_request:
6+
branches: [ master ]
7+
jobs:
8+
test:
9+
name: Run Tests
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Setup System
14+
run: |
15+
sudo apt-get install libsqlite3-dev
16+
- uses: ruby/setup-ruby@v1
17+
- uses: actions/cache@v1
18+
with:
19+
path: vendor/bundle
20+
key: bundle-use-ruby-ubuntu-latest-${{ hashFiles('.ruby-version') }}-${{ hashFiles('**/Gemfile.lock') }}
21+
restore-keys: |
22+
bundle-use-ruby-ubuntu-latest-${{ hashFiles('.ruby-version') }}-
23+
- name: bundle install
24+
run: |
25+
bundle config path vendor/bundle
26+
bundle install --jobs 4 --retry 3
27+
- name: run tests
28+
run: |
29+
bundle exec rails test
30+
- name: Coveralls
31+
uses: coverallsapp/[email protected]
32+
with:
33+
github-token: ${{ secrets.GITHUB_TOKEN }}
34+
path-to-lcov: ./coverage/lcov/timdex.lcov

.travis.yml

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

Gemfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,9 @@ group :test do
4545
gem 'capybara', '>= 2.15'
4646
gem 'chromedriver-helper'
4747
gem 'climate_control'
48-
gem 'coveralls', require: false
4948
gem 'selenium-webdriver'
49+
gem 'simplecov', require: false
50+
gem 'simplecov-lcov', require: false
5051
gem 'timecop'
5152
gem 'vcr'
5253
gem 'webmock'

Gemfile.lock

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -83,12 +83,6 @@ GEM
8383
nokogiri (~> 1.8)
8484
climate_control (0.2.0)
8585
concurrent-ruby (1.1.6)
86-
coveralls (0.8.23)
87-
json (>= 1.8, < 3)
88-
simplecov (~> 0.16.1)
89-
term-ansicolor (~> 1.3)
90-
thor (>= 0.19.4, < 2.0)
91-
tins (~> 1.6)
9286
crack (0.4.3)
9387
safe_yaml (~> 1.0.0)
9488
crass (1.0.6)
@@ -133,7 +127,6 @@ GEM
133127
jbuilder (2.10.0)
134128
activesupport (>= 5.0.0)
135129
jmespath (1.4.0)
136-
json (2.3.0)
137130
jwt (2.2.1)
138131
listen (3.2.1)
139132
rb-fsevent (~> 0.10, >= 0.10.3)
@@ -248,11 +241,11 @@ GEM
248241
rubyzip (>= 1.2.2)
249242
sentry-raven (2.13.0)
250243
faraday (>= 0.7.6, < 1.0)
251-
simplecov (0.16.1)
244+
simplecov (0.18.5)
252245
docile (~> 1.1)
253-
json (>= 1.8, < 3)
254-
simplecov-html (~> 0.10.0)
255-
simplecov-html (0.10.2)
246+
simplecov-html (~> 0.11)
247+
simplecov-html (0.12.2)
248+
simplecov-lcov (0.8.0)
256249
sprockets (3.7.2)
257250
concurrent-ruby (~> 1.0)
258251
rack (> 1, < 3)
@@ -261,15 +254,10 @@ GEM
261254
activesupport (>= 4.0)
262255
sprockets (>= 3.0.0)
263256
sqlite3 (1.4.2)
264-
sync (0.5.0)
265-
term-ansicolor (1.7.1)
266-
tins (~> 1.0)
267257
thor (1.0.1)
268258
thread_safe (0.3.6)
269259
tilt (2.0.10)
270260
timecop (0.9.1)
271-
tins (1.24.1)
272-
sync
273261
tzinfo (1.2.6)
274262
thread_safe (~> 0.1)
275263
uglifier (4.2.0)
@@ -304,7 +292,6 @@ DEPENDENCIES
304292
capybara (>= 2.15)
305293
chromedriver-helper
306294
climate_control
307-
coveralls
308295
devise
309296
dotenv-rails
310297
elasticsearch (~> 6.8)
@@ -327,6 +314,8 @@ DEPENDENCIES
327314
sass-rails
328315
selenium-webdriver
329316
sentry-raven
317+
simplecov
318+
simplecov-lcov
330319
sqlite3
331320
timecop
332321
uglifier

test/test_helper.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
ENV['RAILS_ENV'] ||= 'test'
22

33
require 'simplecov'
4-
require 'coveralls'
4+
require 'simplecov-lcov'
5+
SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true
56
SimpleCov.formatters = [
67
SimpleCov::Formatter::HTMLFormatter,
7-
Coveralls::SimpleCov::Formatter
8+
SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter
89
]
910
SimpleCov.start('rails')
1011

0 commit comments

Comments
 (0)