Skip to content

Commit

Permalink
add circleci first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
christinach committed Apr 11, 2018
1 parent caf4417 commit 46968fd
Show file tree
Hide file tree
Showing 2 changed files with 75 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@

version: 2
jobs:
build:

docker:
# The primary container is an instance of the first list image listed. Your build commands run in this container.
- image: circleci/ruby:2.4.1-node-browsers
environment:
RAILS_ENV: test
PULMAP_DB_HOST: localhost
PULMAP_DB_USERNAME: geoblacklight
# PULMAP_DB_PWD: ''
- image: postgres:10
# environment:
# PG_USER:
# PG_DB:
# PG_PASSWORD:
working_directory: ~/pulmap
steps:
- checkout
# Only necessary if app uses webpacker or yarn in some other way
- restore_cache:
keys:
- pulmap-{{ checksum "package-lock.json" }}
- pulmap-
- run:
name: NPM Install
command: npm install
# Store yarn / webpacker cache
- save_cache:
key: pulmap-{{ checksum "package-lock.json" }}
paths:
- npm_modules

- persist_to_workspace:
root: '~/pulmap'
paths: '*'

# docker:
# - image: circleci/oraclejdk8

# Download and cache dependencies
- restore_cache:
keys:
- pulmap-{{ checksum "Gemfile.lock" }}
# fallback to using the latest cache if no exact match is found
- pulmap-

- run:
name: Install dependencies
command: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle --jobs 4 --retry 3

- run: sudo apt install -y sqlite3

- save_cache:
paths:
- ./vendor/bundle
key: pulmap-{{ checksum "Gemfile.lock" }}

- run: NODE_ENV=test bundle exec rails webpacker:compile

- run:
name: Database setup
command: bundle exec rake db:migrate
# command: bundle exec rake geoblacklight:server
background: true
#- run: bin/jetty_wait
- run: bundle exec rake ci
6 changes: 6 additions & 0 deletions bin/jetty_wait
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env sh

until $(curl --output /dev/null --silent --head --fail http://localhost:8985/solr); do
printf '.'
sleep 1
done

0 comments on commit 46968fd

Please sign in to comment.