From 1936e4373588925bcbef1101632711e3708eafbc Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Fri, 12 Mar 2021 00:47:29 -0800 Subject: [PATCH 01/15] Switch CodeCov badge to Code Climate badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 71f3ac37..1a549b45 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ### Spring 2021 Student Project [![Build Status](https://travis-ci.com/CactusPuppy/snapcon.svg?branch=master)](https://travis-ci.com/CactusPuppy/snapcon) [![Maintainability](https://api.codeclimate.com/v1/badges/6c7fc446b3b10866ba71/maintainability)](https://codeclimate.com/github/CactusPuppy/snapcon/maintainability) -[![codecov](https://codecov.io/gh/CactusPuppy/snapcon/branch/master/graph/badge.svg?token=y4aEAtw6KJ)](https://codecov.io/gh/CactusPuppy/snapcon) +[![Test Coverage](https://api.codeclimate.com/v1/badges/6c7fc446b3b10866ba71/test_coverage)](https://codeclimate.com/github/CactusPuppy/snapcon/test_coverage) [![Security Status](https://hakiri.io/github/CactusPuppy/snapcon/master.svg)](https://hakiri.io/github/CactusPuppy/snapcon/master) [![Depfu](https://badges.depfu.com/badges/16eb1ffb3a9f1a36c4e595a5ae2a1dca/overview.svg)](https://depfu.com/github/CactusPuppy/snapcon?project_id=22682) [![Bluejay Dashboard](https://img.shields.io/badge/Bluejay-Dashboard_5-blue.svg)](http://dashboard.bluejay.governify.io/dashboard/script/dashboardLoader.js?dashboardURL=https://reporter.bluejay.governify.io/api/v4/dashboards/tpa-CS169L-GH-CactusPuppy_snapcon/main) From fd0931f9c2f3973f88ddee119c7f6be7fd250ea2 Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Wed, 17 Mar 2021 14:12:29 -0700 Subject: [PATCH 02/15] Switch to using Codacy for code coverage (following OSEM example) --- .travis.yml | 12 +++--------- README.md | 2 +- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4e6985a3..d7ddbded 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,6 @@ before_install: - "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true - gem install bundler -v $(tail -n 1 Gemfile.lock) - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > $CCTR - - chmod +x $CCTR notifications: email: on_success: change @@ -30,15 +28,11 @@ notifications: before_script: - RAILS_ENV=test bundle exec rake db:bootstrap --trace - RAILS_ENV=test bundle exec bin/rails webdrivers:chromedriver:update - - $CCTR before-build + - bash <(curl -Ls https://coverage.codacy.com/get.sh) download script: - "bin/travis_script.sh $TEST_SUITE" - # TODO Get this working. -after_script: - # combine coverage from all suites, and upload3 to CodeClimate - - $CCTR format-coverage -t simplecov --output coverage/codeclimate.$TEST_SUITE.json - - $CCTR sum-coverage coverage/codeclimate.*.json - - if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then $CCTR upload-coverage; fi +after_success: + - - bash <(curl -Ls https://coverage.codacy.com/get.sh) env: global: diff --git a/README.md b/README.md index 1a549b45..9d332d36 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ### Spring 2021 Student Project [![Build Status](https://travis-ci.com/CactusPuppy/snapcon.svg?branch=master)](https://travis-ci.com/CactusPuppy/snapcon) [![Maintainability](https://api.codeclimate.com/v1/badges/6c7fc446b3b10866ba71/maintainability)](https://codeclimate.com/github/CactusPuppy/snapcon/maintainability) -[![Test Coverage](https://api.codeclimate.com/v1/badges/6c7fc446b3b10866ba71/test_coverage)](https://codeclimate.com/github/CactusPuppy/snapcon/test_coverage) +[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/fd87bbd10aff42fb9f0a16755e78968f)](https://www.codacy.com/gh/CactusPuppy/snapcon/dashboard?utm_source=github.com&utm_medium=referral&utm_content=CactusPuppy/snapcon&utm_campaign=Badge_Coverage) [![Security Status](https://hakiri.io/github/CactusPuppy/snapcon/master.svg)](https://hakiri.io/github/CactusPuppy/snapcon/master) [![Depfu](https://badges.depfu.com/badges/16eb1ffb3a9f1a36c4e595a5ae2a1dca/overview.svg)](https://depfu.com/github/CactusPuppy/snapcon?project_id=22682) [![Bluejay Dashboard](https://img.shields.io/badge/Bluejay-Dashboard_5-blue.svg)](http://dashboard.bluejay.governify.io/dashboard/script/dashboardLoader.js?dashboardURL=https://reporter.bluejay.governify.io/api/v4/dashboards/tpa-CS169L-GH-CactusPuppy_snapcon/main) From 584e5827a1847038ab6db3024060ec027dde301b Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Wed, 17 Mar 2021 14:25:43 -0700 Subject: [PATCH 03/15] Specify where the coverage report is --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index d7ddbded..c03f8287 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ before_script: script: - "bin/travis_script.sh $TEST_SUITE" after_success: - - - bash <(curl -Ls https://coverage.codacy.com/get.sh) + - - bash <(curl -Ls https://coverage.codacy.com/get.sh) -r coverage/coverage.xml env: global: From 9357c71eee05e28121f79695af6bbee981340136 Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Wed, 17 Mar 2021 14:27:25 -0700 Subject: [PATCH 04/15] Fix minor typo in .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c03f8287..789439ef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,7 @@ before_script: script: - "bin/travis_script.sh $TEST_SUITE" after_success: - - - bash <(curl -Ls https://coverage.codacy.com/get.sh) -r coverage/coverage.xml + - bash <(curl -Ls https://coverage.codacy.com/get.sh) -r coverage/coverage.xml env: global: From 1a56c9c984728fd370074f0fe34e1715635f7b35 Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Wed, 17 Mar 2021 15:50:37 -0700 Subject: [PATCH 05/15] Actually properly report parallel stages --- .travis.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 789439ef..d95e947c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -32,7 +32,12 @@ before_script: script: - "bin/travis_script.sh $TEST_SUITE" after_success: - - bash <(curl -Ls https://coverage.codacy.com/get.sh) -r coverage/coverage.xml + - bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial -l Ruby -r coverage/coverage.xml + +jobs: + include: + - stage: finalize + script: bash <(curl -Ls https://coverage.codacy.com/get.sh) final env: global: @@ -40,8 +45,6 @@ env: - OSEM_DB_HOST='' - OSEM_DB_PORT='' - OSEM_DB_NAME='osem_test' - - CC_TEST_REPORTER_ID=$CC_TEST_REPORTER - - CCTR=./cc-test-reporter matrix: - TEST_SUITE=ability - TEST_SUITE=features From 0e28b5694a43a915f1a2fac17406afd9b588d394 Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Wed, 17 Mar 2021 15:56:50 -0700 Subject: [PATCH 06/15] Prevent overwriting of jobs by matrix --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index d95e947c..4991fea1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,6 +35,7 @@ after_success: - bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial -l Ruby -r coverage/coverage.xml jobs: + fast_finish: false include: - stage: finalize script: bash <(curl -Ls https://coverage.codacy.com/get.sh) final @@ -45,11 +46,9 @@ env: - OSEM_DB_HOST='' - OSEM_DB_PORT='' - OSEM_DB_NAME='osem_test' - matrix: + jobs: - TEST_SUITE=ability - TEST_SUITE=features - TEST_SUITE=models - TEST_SUITE=controllers - TEST_SUITE=rest -matrix: - fast_finish: false From c7482bef1bf3c418b5757ec299878529c97cca8e Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Wed, 17 Mar 2021 16:14:33 -0700 Subject: [PATCH 07/15] Ensure coverage.xml is generated on Travis --- spec/spec_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index d3e17427..2d680fb2 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -3,7 +3,7 @@ # This file is copied to spec/ when you run 'rails generate rspec:install' require 'simplecov' -if ENV['GITHUB_ACTIONS'] +if ENV['GITHUB_ACTIONS'] || ENV['TRAVIS'] require 'simplecov-cobertura' SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter end From 8342b4c283f751b63200ac007439dc8fa8d22c47 Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Wed, 17 Mar 2021 20:38:14 -0700 Subject: [PATCH 08/15] Try an experimental .travis.yml which uploads coverage to CodeClimate --- .travis.yml | 106 +++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 80 insertions(+), 26 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4991fea1..67ce4176 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,9 @@ +os: linux +dist: bionic language: ruby cache: bundler rvm: - 2.6.6 -dist: bionic addons: apt: packages: @@ -12,10 +13,6 @@ services: branches: except: - /^depfu/.*$/ -before_install: - - "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" - - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true - - gem install bundler -v $(tail -n 1 Gemfile.lock) notifications: email: on_success: change @@ -25,30 +22,87 @@ notifications: - "chat.freenode.net#osem" on_success: change on_failure: change -before_script: - - RAILS_ENV=test bundle exec rake db:bootstrap --trace - - RAILS_ENV=test bundle exec bin/rails webdrivers:chromedriver:update - - bash <(curl -Ls https://coverage.codacy.com/get.sh) download -script: - - "bin/travis_script.sh $TEST_SUITE" -after_success: - - bash <(curl -Ls https://coverage.codacy.com/get.sh) report --partial -l Ruby -r coverage/coverage.xml - -jobs: - fast_finish: false - include: - - stage: finalize - script: bash <(curl -Ls https://coverage.codacy.com/get.sh) final - +stages: + - test + - finalize env: global: - OSEM_DB_ADAPTER=sqlite3 - OSEM_DB_HOST='' - OSEM_DB_PORT='' - OSEM_DB_NAME='osem_test' - jobs: - - TEST_SUITE=ability - - TEST_SUITE=features - - TEST_SUITE=models - - TEST_SUITE=controllers - - TEST_SUITE=rest + - CC_TEST_REPORTER_ID=$CC_TEST_REPORTER + - CCTR=./cc-test-reporter + - TOTAL_TEST_SUITES=5 +jobs: + - &tests + before_install: + - "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" + - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true + - gem install bundler -v $(tail -n 1 Gemfile.lock) + - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > $CCTR + - chmod +x $CCTR + before_script: + - RAILS_ENV=test bundle exec rake db:bootstrap --trace + - RAILS_ENV=test bundle exec bin/rails webdrivers:chromedriver:update + - $CCTR before-build + script: + - "bin/travis_script.sh $TEST_SUITE" + after_success: + - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.1.json ./coverage/spec/.resultset.json + env: + - TEST_SUITE=ability + workspaces: + create: + name: ws1 + paths: + - coverage/codeclimate.1.json + - <<: *tests + env: + - TEST_SUITE=features + after_success: + - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.2.json ./coverage/spec/.resultset.json + workspaces: + create: + name: ws2 + paths: + - coverage/codeclimate.2.json + - <<: *tests + env: + - TEST_SUITE=models + after_success: + - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.3.json ./coverage/spec/.resultset.json + workspaces: + create: + name: ws3 + paths: + - coverage/codeclimate.3.json + - <<: *tests + env: + - TEST_SUITE=controllers + after_success: + - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.4.json ./coverage/spec/.resultset.json + workspaces: + create: + name: ws4 + paths: + - coverage/codeclimate.4.json + - <<: *tests + env: + - TEST_SUITE=features + after_success: + - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.5.json ./coverage/spec/.resultset.json + workspaces: + create: + name: ws5 + paths: + - coverage/codeclimate.5.json + - stage: finalize + workspaces: + use: + - ws1 + - ws2 + - ws3 + - ws4 + - ws5 + script: $CCTR sum-coverage --output - --parts $TOTAL_TEST_SUITES coverage/codeclimate.*.json | $CCTR upload-coverage --input - From 8f1df20c543b86383087f49444abf079fd9fe303 Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Wed, 17 Mar 2021 20:41:13 -0700 Subject: [PATCH 09/15] Properly format jobs list --- .travis.yml | 143 ++++++++++++++++++++++++++-------------------------- 1 file changed, 72 insertions(+), 71 deletions(-) diff --git a/.travis.yml b/.travis.yml index 67ce4176..f3edd2a4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,74 +35,75 @@ env: - CCTR=./cc-test-reporter - TOTAL_TEST_SUITES=5 jobs: - - &tests - before_install: - - "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" - - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true - - gem install bundler -v $(tail -n 1 Gemfile.lock) - - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > $CCTR - - chmod +x $CCTR - before_script: - - RAILS_ENV=test bundle exec rake db:bootstrap --trace - - RAILS_ENV=test bundle exec bin/rails webdrivers:chromedriver:update - - $CCTR before-build - script: - - "bin/travis_script.sh $TEST_SUITE" - after_success: - - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.1.json ./coverage/spec/.resultset.json - env: - - TEST_SUITE=ability - workspaces: - create: - name: ws1 - paths: - - coverage/codeclimate.1.json - - <<: *tests - env: - - TEST_SUITE=features - after_success: - - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.2.json ./coverage/spec/.resultset.json - workspaces: - create: - name: ws2 - paths: - - coverage/codeclimate.2.json - - <<: *tests - env: - - TEST_SUITE=models - after_success: - - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.3.json ./coverage/spec/.resultset.json - workspaces: - create: - name: ws3 - paths: - - coverage/codeclimate.3.json - - <<: *tests - env: - - TEST_SUITE=controllers - after_success: - - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.4.json ./coverage/spec/.resultset.json - workspaces: - create: - name: ws4 - paths: - - coverage/codeclimate.4.json - - <<: *tests - env: - - TEST_SUITE=features - after_success: - - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.5.json ./coverage/spec/.resultset.json - workspaces: - create: - name: ws5 - paths: - - coverage/codeclimate.5.json - - stage: finalize - workspaces: - use: - - ws1 - - ws2 - - ws3 - - ws4 - - ws5 - script: $CCTR sum-coverage --output - --parts $TOTAL_TEST_SUITES coverage/codeclimate.*.json | $CCTR upload-coverage --input - + include: + - &tests + before_install: + - "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" + - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true + - gem install bundler -v $(tail -n 1 Gemfile.lock) + - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > $CCTR + - chmod +x $CCTR + before_script: + - RAILS_ENV=test bundle exec rake db:bootstrap --trace + - RAILS_ENV=test bundle exec bin/rails webdrivers:chromedriver:update + - $CCTR before-build + script: + - "bin/travis_script.sh $TEST_SUITE" + after_success: + - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.1.json ./coverage/spec/.resultset.json + env: + - TEST_SUITE=ability + workspaces: + create: + name: ws1 + paths: + - coverage/codeclimate.1.json + - <<: *tests + env: + - TEST_SUITE=features + after_success: + - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.2.json ./coverage/spec/.resultset.json + workspaces: + create: + name: ws2 + paths: + - coverage/codeclimate.2.json + - <<: *tests + env: + - TEST_SUITE=models + after_success: + - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.3.json ./coverage/spec/.resultset.json + workspaces: + create: + name: ws3 + paths: + - coverage/codeclimate.3.json + - <<: *tests + env: + - TEST_SUITE=controllers + after_success: + - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.4.json ./coverage/spec/.resultset.json + workspaces: + create: + name: ws4 + paths: + - coverage/codeclimate.4.json + - <<: *tests + env: + - TEST_SUITE=features + after_success: + - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.5.json ./coverage/spec/.resultset.json + workspaces: + create: + name: ws5 + paths: + - coverage/codeclimate.5.json + - stage: finalize + workspaces: + use: + - ws1 + - ws2 + - ws3 + - ws4 + - ws5 + script: $CCTR sum-coverage --output - --parts $TOTAL_TEST_SUITES coverage/codeclimate.*.json | $CCTR upload-coverage --input - From 728b6084f91edae5d3d275933afa218ee98b7557 Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Thu, 18 Mar 2021 16:10:24 -0700 Subject: [PATCH 10/15] Try CodeClimate reporting again --- .travis.yml | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index f3edd2a4..5de44c20 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,9 +48,7 @@ jobs: - RAILS_ENV=test bundle exec bin/rails webdrivers:chromedriver:update - $CCTR before-build script: - - "bin/travis_script.sh $TEST_SUITE" - after_success: - - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.1.json ./coverage/spec/.resultset.json + - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.1.json ./coverage/spec/.resultset.json" env: - TEST_SUITE=ability workspaces: @@ -61,8 +59,8 @@ jobs: - <<: *tests env: - TEST_SUITE=features - after_success: - - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.2.json ./coverage/spec/.resultset.json + script: + - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.2.json ./coverage/spec/.resultset.json" workspaces: create: name: ws2 @@ -71,8 +69,8 @@ jobs: - <<: *tests env: - TEST_SUITE=models - after_success: - - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.3.json ./coverage/spec/.resultset.json + script: + - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.3.json ./coverage/spec/.resultset.json" workspaces: create: name: ws3 @@ -81,8 +79,8 @@ jobs: - <<: *tests env: - TEST_SUITE=controllers - after_success: - - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.4.json ./coverage/spec/.resultset.json + script: + - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.4.json ./coverage/spec/.resultset.json" workspaces: create: name: ws4 @@ -91,14 +89,17 @@ jobs: - <<: *tests env: - TEST_SUITE=features - after_success: - - $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.5.json ./coverage/spec/.resultset.json + script: + - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.5.json ./coverage/spec/.resultset.json" workspaces: create: name: ws5 paths: - coverage/codeclimate.5.json - stage: finalize + before_install: + - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > $CCTR + - chmod +x $CCTR workspaces: use: - ws1 From 1c0b477c1b9c26d91b5703f49adfa6fbe4ef6c2b Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Thu, 18 Mar 2021 16:24:01 -0700 Subject: [PATCH 11/15] Try using Cobertura output instead of resultset.json --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5de44c20..d65ebe53 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,7 +48,7 @@ jobs: - RAILS_ENV=test bundle exec bin/rails webdrivers:chromedriver:update - $CCTR before-build script: - - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.1.json ./coverage/spec/.resultset.json" + - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.1.json ./coverage/spec/coverage.xml" env: - TEST_SUITE=ability workspaces: @@ -60,7 +60,7 @@ jobs: env: - TEST_SUITE=features script: - - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.2.json ./coverage/spec/.resultset.json" + - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.2.json ./coverage/spec/coverage.xml" workspaces: create: name: ws2 @@ -70,7 +70,7 @@ jobs: env: - TEST_SUITE=models script: - - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.3.json ./coverage/spec/.resultset.json" + - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.3.json ./coverage/spec/coverage.xml" workspaces: create: name: ws3 @@ -80,7 +80,7 @@ jobs: env: - TEST_SUITE=controllers script: - - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.4.json ./coverage/spec/.resultset.json" + - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.4.json ./coverage/spec/coverage.xml" workspaces: create: name: ws4 @@ -90,7 +90,7 @@ jobs: env: - TEST_SUITE=features script: - - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t simplecov -o ./coverage/codeclimate.5.json ./coverage/spec/.resultset.json" + - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.5.json ./coverage/spec/coverage.xml" workspaces: create: name: ws5 From f5b9806aca4e1642725a22ffed07ba4f4a3587c8 Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Thu, 18 Mar 2021 16:32:45 -0700 Subject: [PATCH 12/15] Correct path to Cobertura output --- .travis.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index d65ebe53..7edccc32 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,7 +48,7 @@ jobs: - RAILS_ENV=test bundle exec bin/rails webdrivers:chromedriver:update - $CCTR before-build script: - - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.1.json ./coverage/spec/coverage.xml" + - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.1.json ./coverage/coverage.xml" env: - TEST_SUITE=ability workspaces: @@ -60,7 +60,7 @@ jobs: env: - TEST_SUITE=features script: - - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.2.json ./coverage/spec/coverage.xml" + - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.2.json ./coverage/coverage.xml" workspaces: create: name: ws2 @@ -70,7 +70,7 @@ jobs: env: - TEST_SUITE=models script: - - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.3.json ./coverage/spec/coverage.xml" + - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.3.json ./coverage/coverage.xml" workspaces: create: name: ws3 @@ -80,7 +80,7 @@ jobs: env: - TEST_SUITE=controllers script: - - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.4.json ./coverage/spec/coverage.xml" + - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.4.json ./coverage/coverage.xml" workspaces: create: name: ws4 @@ -90,7 +90,7 @@ jobs: env: - TEST_SUITE=features script: - - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.5.json ./coverage/spec/coverage.xml" + - "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.5.json ./coverage/coverage.xml" workspaces: create: name: ws5 From fb741ca28d25b4de82f469f22204e46eceb57465 Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Thu, 18 Mar 2021 16:44:38 -0700 Subject: [PATCH 13/15] Restore Code Coverage badge --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9d332d36..1a549b45 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ### Spring 2021 Student Project [![Build Status](https://travis-ci.com/CactusPuppy/snapcon.svg?branch=master)](https://travis-ci.com/CactusPuppy/snapcon) [![Maintainability](https://api.codeclimate.com/v1/badges/6c7fc446b3b10866ba71/maintainability)](https://codeclimate.com/github/CactusPuppy/snapcon/maintainability) -[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/fd87bbd10aff42fb9f0a16755e78968f)](https://www.codacy.com/gh/CactusPuppy/snapcon/dashboard?utm_source=github.com&utm_medium=referral&utm_content=CactusPuppy/snapcon&utm_campaign=Badge_Coverage) +[![Test Coverage](https://api.codeclimate.com/v1/badges/6c7fc446b3b10866ba71/test_coverage)](https://codeclimate.com/github/CactusPuppy/snapcon/test_coverage) [![Security Status](https://hakiri.io/github/CactusPuppy/snapcon/master.svg)](https://hakiri.io/github/CactusPuppy/snapcon/master) [![Depfu](https://badges.depfu.com/badges/16eb1ffb3a9f1a36c4e595a5ae2a1dca/overview.svg)](https://depfu.com/github/CactusPuppy/snapcon?project_id=22682) [![Bluejay Dashboard](https://img.shields.io/badge/Bluejay-Dashboard_5-blue.svg)](http://dashboard.bluejay.governify.io/dashboard/script/dashboardLoader.js?dashboardURL=https://reporter.bluejay.governify.io/api/v4/dashboards/tpa-CS169L-GH-CactusPuppy_snapcon/main) From 554f897b27d55d27e5145d0147e2003fed88477e Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Thu, 18 Mar 2021 17:16:28 -0700 Subject: [PATCH 14/15] Ensure finalize stage does not have unecessary installation to do --- .travis.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7edccc32..60fd1b3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,5 @@ os: linux dist: bionic -language: ruby -cache: bundler -rvm: - - 2.6.6 -addons: - apt: - packages: - - chromium-browser -services: - - postgresql branches: except: - /^depfu/.*$/ @@ -37,6 +27,16 @@ env: jobs: include: - &tests + language: ruby + cache: bundler + rvm: + - 2.6.6 + addons: + apt: + packages: + - chromium-browser + services: + - postgresql before_install: - "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" - gem uninstall -v '>= 2' -i $(rvm gemdir)@global -ax bundler || true From 4989b0e4e908cf87ce79e74feed0d71a1ec7feb4 Mon Sep 17 00:00:00 2001 From: CactusPuppy Date: Thu, 18 Mar 2021 17:23:12 -0700 Subject: [PATCH 15/15] Avoid installing Ruby in finalize stage --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 60fd1b3d..0205ad21 100644 --- a/.travis.yml +++ b/.travis.yml @@ -97,6 +97,7 @@ jobs: paths: - coverage/codeclimate.5.json - stage: finalize + language: minimal before_install: - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > $CCTR - chmod +x $CCTR