-
-
Save scherztc/b5291277f6f87134658371d267f8afc0 to your computer and use it in GitHub Desktop.
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
# Ruby CircleCI 2.0 configuration file | |
# | |
# Check https://circleci.com/docs/2.0/language-ruby/ for more details | |
# | |
version: 2 | |
jobs: | |
build: | |
docker: | |
# specify the version you desire here | |
- image: circleci/ruby:2.6.5-node-browsers | |
- image: circleci/redis:4 | |
working_directory: ~/ucrate | |
steps: | |
- checkout | |
- restore_cache: | |
keys: | |
- v1-dependencies-{{ checksum "Gemfile.lock" }} | |
# fallback to using the latest cache if no exact match is found | |
- v1-dependencies- | |
- run: | |
name: Configure Bundler | |
command: | | |
echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV | |
source $BASH_ENV | |
gem install bundler -v 2.0.1 | |
- run: | |
name: Install Dependencies | |
command: | | |
bundle install --jobs=4 --retry=3 --path vendor/bundle | |
sudo apt-get update | |
sudo apt-get install xvfb libfontconfig wkhtmltopdf | |
- save_cache: | |
paths: | |
- ./vendor/bundle | |
key: v1-dependencies-{{ checksum "Gemfile.lock" }} | |
# Database setup | |
- run: bundle exec rake db:create | |
- run: bundle exec rake db:schema:load | |
- run: bundle exec rake db:migrate | |
- run: bundle exec solr_wrapper -d solr/config/ --collection_name hydra-test -p 8985 | |
- run: bundle exec fcrepo_wrapper -p 8986 | |
- run: | |
name: Rubocop | |
command: | | |
gem install rubocop | |
bundle exec rubocop | |
# run tests! | |
- run: bundle exec rspec spec | |
# collect reports | |
- store_test_results: | |
path: /tmp/test-results | |
- store_artifacts: | |
path: /tmp/test-results | |
destination: test-results |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment