Merge branch 'return-to-code-climate-coverage' into fix-ci
This commit is contained in:
commit
6fed679644
2 changed files with 93 additions and 36 deletions
119
.travis.yml
119
.travis.yml
|
|
@ -1,21 +1,8 @@
|
||||||
language: ruby
|
os: linux
|
||||||
cache: bundler
|
|
||||||
rvm:
|
|
||||||
- 2.6.6
|
|
||||||
dist: bionic
|
dist: bionic
|
||||||
addons:
|
|
||||||
apt:
|
|
||||||
packages:
|
|
||||||
- chromium-browser
|
|
||||||
services:
|
|
||||||
- postgresql
|
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
- /^depfu/.*$/
|
- /^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:
|
notifications:
|
||||||
email:
|
email:
|
||||||
on_success: change
|
on_success: change
|
||||||
|
|
@ -25,30 +12,100 @@ notifications:
|
||||||
- "chat.freenode.net#osem"
|
- "chat.freenode.net#osem"
|
||||||
on_success: change
|
on_success: change
|
||||||
on_failure: change
|
on_failure: change
|
||||||
before_script:
|
stages:
|
||||||
- RAILS_ENV=test bundle exec rake db:bootstrap --trace
|
- test
|
||||||
- RAILS_ENV=test bundle exec bin/rails webdrivers:chromedriver:update
|
- finalize
|
||||||
- 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
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
global:
|
global:
|
||||||
- OSEM_DB_ADAPTER=sqlite3
|
- OSEM_DB_ADAPTER=sqlite3
|
||||||
- OSEM_DB_HOST=''
|
- OSEM_DB_HOST=''
|
||||||
- OSEM_DB_PORT=''
|
- OSEM_DB_PORT=''
|
||||||
- OSEM_DB_NAME='osem_test'
|
- OSEM_DB_NAME='osem_test'
|
||||||
jobs:
|
- CC_TEST_REPORTER_ID=$CC_TEST_REPORTER
|
||||||
|
- CCTR=./cc-test-reporter
|
||||||
|
- TOTAL_TEST_SUITES=5
|
||||||
|
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
|
||||||
|
- 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 && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.1.json ./coverage/coverage.xml"
|
||||||
|
env:
|
||||||
- TEST_SUITE=ability
|
- TEST_SUITE=ability
|
||||||
|
workspaces:
|
||||||
|
create:
|
||||||
|
name: ws1
|
||||||
|
paths:
|
||||||
|
- coverage/codeclimate.1.json
|
||||||
|
- <<: *tests
|
||||||
|
env:
|
||||||
- TEST_SUITE=features
|
- TEST_SUITE=features
|
||||||
|
script:
|
||||||
|
- "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.2.json ./coverage/coverage.xml"
|
||||||
|
workspaces:
|
||||||
|
create:
|
||||||
|
name: ws2
|
||||||
|
paths:
|
||||||
|
- coverage/codeclimate.2.json
|
||||||
|
- <<: *tests
|
||||||
|
env:
|
||||||
- TEST_SUITE=models
|
- TEST_SUITE=models
|
||||||
|
script:
|
||||||
|
- "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.3.json ./coverage/coverage.xml"
|
||||||
|
workspaces:
|
||||||
|
create:
|
||||||
|
name: ws3
|
||||||
|
paths:
|
||||||
|
- coverage/codeclimate.3.json
|
||||||
|
- <<: *tests
|
||||||
|
env:
|
||||||
- TEST_SUITE=controllers
|
- TEST_SUITE=controllers
|
||||||
- TEST_SUITE=rest
|
script:
|
||||||
|
- "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.4.json ./coverage/coverage.xml"
|
||||||
|
workspaces:
|
||||||
|
create:
|
||||||
|
name: ws4
|
||||||
|
paths:
|
||||||
|
- coverage/codeclimate.4.json
|
||||||
|
- <<: *tests
|
||||||
|
env:
|
||||||
|
- TEST_SUITE=features
|
||||||
|
script:
|
||||||
|
- "bin/travis_script.sh $TEST_SUITE && $CCTR format-coverage -t cobertura -o ./coverage/codeclimate.5.json ./coverage/coverage.xml"
|
||||||
|
workspaces:
|
||||||
|
create:
|
||||||
|
name: ws5
|
||||||
|
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
|
||||||
|
workspaces:
|
||||||
|
use:
|
||||||
|
- ws1
|
||||||
|
- ws2
|
||||||
|
- ws3
|
||||||
|
- ws4
|
||||||
|
- ws5
|
||||||
|
script: $CCTR sum-coverage --output - --parts $TOTAL_TEST_SUITES coverage/codeclimate.*.json | $CCTR upload-coverage --input -
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
### Spring 2021 Student Project
|
### Spring 2021 Student Project
|
||||||
[](https://travis-ci.com/CactusPuppy/snapcon)
|
[](https://travis-ci.com/CactusPuppy/snapcon)
|
||||||
[](https://codeclimate.com/github/CactusPuppy/snapcon/maintainability)
|
[](https://codeclimate.com/github/CactusPuppy/snapcon/maintainability)
|
||||||
[](https://www.codacy.com/gh/CactusPuppy/snapcon/dashboard?utm_source=github.com&utm_medium=referral&utm_content=CactusPuppy/snapcon&utm_campaign=Badge_Coverage)
|
[](https://codeclimate.com/github/CactusPuppy/snapcon/test_coverage)
|
||||||
[](https://hakiri.io/github/CactusPuppy/snapcon/master)
|
[](https://hakiri.io/github/CactusPuppy/snapcon/master)
|
||||||
[](https://depfu.com/github/CactusPuppy/snapcon?project_id=22682)
|
[](https://depfu.com/github/CactusPuppy/snapcon?project_id=22682)
|
||||||
[](http://dashboard.bluejay.governify.io/dashboard/script/dashboardLoader.js?dashboardURL=https://reporter.bluejay.governify.io/api/v4/dashboards/tpa-CS169L-GH-CactusPuppy_snapcon/main)
|
[](http://dashboard.bluejay.governify.io/dashboard/script/dashboardLoader.js?dashboardURL=https://reporter.bluejay.governify.io/api/v4/dashboards/tpa-CS169L-GH-CactusPuppy_snapcon/main)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue