Skip to content
Snippets Groups Projects
Commit 47fbd8ff authored by Kapil Patel's avatar Kapil Patel
Browse files

Added config.yml file for circleci

parent 35ef8e19
Branches setup-circleci
No related tags found
No related merge requests found
version: 2.1
orbs:
ruby: circleci/ruby@1.4.0
jobs:
build:
docker:
- image: cimg/ruby:2.7.6-node
- image: circleci/postgres:12-alpine
environment:
POSTGRES_USER: 'postgres'
POSTGRES_DB: 'hyrax_test'
- image: cimg/redis:6.2.6
steps:
- checkout
- restore_cache:
keys:
- rails-demo-{{ checksum "hyrax/Gemfile.lock" }}
- rails-demo-
- run:
name: bundle install
command: |
cd hyrax
bundle install --jobs 4 --retry 3
- run:
name: download fits
command: |
export FITS_ROOT=~/rdms-hyrax/
mkdir -p ${FITS_ROOT}
wget -q https://github.com/harvard-lts/fits/releases/download/1.5.0/fits-1.5.0.zip -O ${FITS_ROOT}/fits-1.5.0.zip
unzip -q ${FITS_ROOT}/fits-1.5.0.zip -d ${FITS_ROOT}/fits-1.5.0
chmod a+x ${FITS_ROOT}/fits-1.5.0/fits.sh
rm ${FITS_ROOT}/fits-1.5.0.zip
- run:
name: prepare database
command: |
cd hyrax
bundle exec rake db:test:prepare
- run:
name: run tests
command: |
cd hyrax
export FITS_PATH=~/rdms-hyrax/fits-1.3.0/fits.sh
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | circleci tests split --split-by=timings)"
if test -f "lib/tasks/test_servers.rake"; then echo 'Running full tests' && bundle exec rake test:servers:start && bundle exec rspec && bundle exec rake test:servers:stop; else echo "Running limited tests"; bundle exec rspec --exclude-pattern "**/features/*_spec.rb"; fi
- store_test_results:
path: /tmp/test-results
- store_artifacts:
path: /tmp/test-results
destination: test-results
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment