diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..16e7c272 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,34 @@ +name: CI +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] +jobs: + test: + name: Run Tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Setup System + run: | + sudo apt-get install libsqlite3-dev + - uses: ruby/setup-ruby@v1 + - uses: actions/cache@v1 + with: + path: vendor/bundle + key: bundle-use-ruby-ubuntu-latest-${{ hashFiles('.ruby-version') }}-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + bundle-use-ruby-ubuntu-latest-${{ hashFiles('.ruby-version') }}- + - name: bundle install + run: | + bundle config path vendor/bundle + bundle install --jobs 4 --retry 3 + - name: run tests + run: | + bundle exec rails test + - name: Coveralls + uses: coverallsapp/github-action@v1.0.1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: ./coverage/lcov/timdex.lcov diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 1585a9fa..00000000 --- a/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -language: ruby -cache: bundler -sudo: false -script: bin/rails test diff --git a/Gemfile b/Gemfile index b82d9d42..b0c70e13 100644 --- a/Gemfile +++ b/Gemfile @@ -45,8 +45,9 @@ group :test do gem 'capybara', '>= 2.15' gem 'chromedriver-helper' gem 'climate_control' - gem 'coveralls', require: false gem 'selenium-webdriver' + gem 'simplecov', require: false + gem 'simplecov-lcov', require: false gem 'timecop' gem 'vcr' gem 'webmock' diff --git a/Gemfile.lock b/Gemfile.lock index f8e2b212..4457d8c7 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -83,12 +83,6 @@ GEM nokogiri (~> 1.8) climate_control (0.2.0) concurrent-ruby (1.1.6) - coveralls (0.8.23) - json (>= 1.8, < 3) - simplecov (~> 0.16.1) - term-ansicolor (~> 1.3) - thor (>= 0.19.4, < 2.0) - tins (~> 1.6) crack (0.4.3) safe_yaml (~> 1.0.0) crass (1.0.6) @@ -133,7 +127,6 @@ GEM jbuilder (2.10.0) activesupport (>= 5.0.0) jmespath (1.4.0) - json (2.3.0) jwt (2.2.1) listen (3.2.1) rb-fsevent (~> 0.10, >= 0.10.3) @@ -248,11 +241,11 @@ GEM rubyzip (>= 1.2.2) sentry-raven (2.13.0) faraday (>= 0.7.6, < 1.0) - simplecov (0.16.1) + simplecov (0.18.5) docile (~> 1.1) - json (>= 1.8, < 3) - simplecov-html (~> 0.10.0) - simplecov-html (0.10.2) + simplecov-html (~> 0.11) + simplecov-html (0.12.2) + simplecov-lcov (0.8.0) sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) @@ -261,15 +254,10 @@ GEM activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.4.2) - sync (0.5.0) - term-ansicolor (1.7.1) - tins (~> 1.0) thor (1.0.1) thread_safe (0.3.6) tilt (2.0.10) timecop (0.9.1) - tins (1.24.1) - sync tzinfo (1.2.6) thread_safe (~> 0.1) uglifier (4.2.0) @@ -304,7 +292,6 @@ DEPENDENCIES capybara (>= 2.15) chromedriver-helper climate_control - coveralls devise dotenv-rails elasticsearch (~> 6.8) @@ -327,6 +314,8 @@ DEPENDENCIES sass-rails selenium-webdriver sentry-raven + simplecov + simplecov-lcov sqlite3 timecop uglifier diff --git a/test/test_helper.rb b/test/test_helper.rb index 5e3c5672..31e4307a 100644 --- a/test/test_helper.rb +++ b/test/test_helper.rb @@ -1,10 +1,11 @@ ENV['RAILS_ENV'] ||= 'test' require 'simplecov' -require 'coveralls' +require 'simplecov-lcov' +SimpleCov::Formatter::LcovFormatter.config.report_with_single_file = true SimpleCov.formatters = [ SimpleCov::Formatter::HTMLFormatter, - Coveralls::SimpleCov::Formatter + SimpleCov.formatter = SimpleCov::Formatter::LcovFormatter ] SimpleCov.start('rails')