forked from presidentbeef/brakeman
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run CircleCI tests with many Rubies (presidentbeef#1336)
Move all testing to CircleCI, remove TravisCI
- Loading branch information
1 parent
21f86ff
commit 0b34041
Showing
4 changed files
with
73 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,80 @@ | ||
version: 2 | ||
version: 2.1 | ||
jobs: | ||
build: | ||
branches: | ||
ignore: | ||
- gh-pages | ||
default: &default | ||
docker: | ||
- image: circleci/ruby:2.5.1-stretch-node-browsers | ||
environment: | ||
BUNDLE_JOBS: 4 | ||
BUNDLE_RETRY: 3 | ||
BUNDLE_PATH: vendor/bundle | ||
parallelism: 4 | ||
- image: circleci/ruby:latest | ||
steps: | ||
- checkout | ||
- run: bundle check || bundle install | ||
- run: | ||
command: bundle exec rake | ||
- store_test_results: | ||
path: test-results | ||
test-2-3: | ||
<<: *default | ||
docker: | ||
- image: circleci/ruby:2.3 | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: ~/repo/tmp | ||
- run: | ||
name: Download cc-test-reporter | ||
command: | | ||
mkdir -p tmp/ | ||
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./tmp/cc-test-reporter | ||
chmod +x ./tmp/cc-test-reporter | ||
- run: bundle check || bundle install | ||
- run: | ||
command: | | ||
TESTFILES=$(circleci tests glob "test/tests/*.rb" | circleci tests split --split-by=timings) | ||
bundle exec ruby -e 'ARGV.each {|f| require File.join(".", f) }' -- $TESTFILES | ||
bundle exec rake | ||
./tmp/cc-test-reporter format-coverage -t simplecov -o tmp/codeclimate.json coverage/.resultset.json | ||
- store_test_results: | ||
path: test-results | ||
- persist_to_workspace: | ||
root: tmp | ||
paths: | ||
- codeclimate.json | ||
- cc-test-reporter | ||
test-2-4: | ||
<<: *default | ||
docker: | ||
- image: circleci/ruby:2.4 | ||
test-2-5: | ||
<<: *default | ||
docker: | ||
- image: circleci/ruby:2.5 | ||
test-2-6: | ||
<<: *default | ||
docker: | ||
- image: circleci/ruby:2.6 | ||
test-latest: | ||
<<: *default | ||
docker: | ||
- image: circleci/ruby:latest | ||
test-jruby: | ||
<<: *default | ||
docker: | ||
- image: circleci/jruby:latest | ||
upload-coverage: | ||
<<: *default | ||
working_directory: ~/repo | ||
steps: | ||
- attach_workspace: | ||
at: ~/repo/tmp | ||
- run: | ||
name: Upload coverage results to Code Climate | ||
command: "./tmp/cc-test-reporter upload-coverage -i ./tmp/codeclimate.json" | ||
workflows: | ||
version: 2 | ||
tests: | ||
jobs: | ||
- default | ||
- test-2-3 | ||
- test-2-4 | ||
- test-2-5 | ||
- test-2-6 | ||
- test-jruby | ||
- upload-coverage: | ||
requires: | ||
- test-2-3 |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters