-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
caf4417
commit 46968fd
Showing
2 changed files
with
75 additions
and
0 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 |
---|---|---|
@@ -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 |
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 |
---|---|---|
@@ -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 |