Revert "removes an override we don't need in hyrax 3 (#107)" (#114) #909
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
name: CI | |
on: | |
push: | |
branches: ['**'] | |
pull_request: | |
branches: ['**'] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
NOKOGIRI_USE_SYSTEM_LIBRARIES: true | |
DEFAULT_ADMIN_SET: 'default' | |
DATABASE_AUTH: true | |
DATA_STORAGE: ./public | |
TEMP_STORAGE: ./public | |
ALLOW_NOTIFICATIONS: true | |
DB_DATABASE: epigaea_test | |
DB_USER: root | |
DB_PASSWORD: root | |
TRAVIS: true | |
FEDORA_URL: http://127.0.0.1:8986/rest | |
services: | |
redis: | |
image: redis | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
- 6379:6379 | |
strategy: | |
fail-fast: false | |
matrix: | |
ruby-version: ['2.7.5'] | |
steps: | |
- name: Pin chrome | |
uses: abhi1693/setup-browser@v0.3.4 | |
with: | |
browser: chrome | |
version: 1036826 | |
- name: Install OS packages | |
run: | | |
sudo apt-get update | |
sudo apt-get install unzip imagemagick ghostscript libpq-dev libxslt-dev | |
- uses: actions/checkout@v2 | |
- name: Set up Ruby | |
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, | |
# change this to (see https://github.com/ruby/setup-ruby#versioning): | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: ${{ matrix.ruby-version }} | |
bundler: "2.1.4" | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
# TODO: Tempoary remove this update untill ruby 3 | |
# - name: Update rubygems | |
# run: | | |
# gem update --system | |
# gem install bundler:2.1.4 | |
- name: Set up JDK 1.8 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 1.8 | |
- name: Install FITS | |
run: | | |
curl -o $HOME/fits-1.0.5.zip https://projects.iq.harvard.edu/files/fits/files/fits-1.0.5.zip | cat | |
unzip $HOME/fits-1.0.5.zip -d $HOME | |
chmod u=u+x $HOME/fits-1.0.5/fits.sh | |
- name: Set up MySQL | |
run: | | |
sudo systemctl enable mysql.service | |
sudo systemctl start mysql.service | |
mysql -e 'CREATE DATABASE ${{ env.DB_DATABASE }};' -u${{ env.DB_USER }} -p${{ env.DB_PASSWORD }} | |
- name: Configure test environment | |
run: | | |
cp config/fedora.yml.sample config/fedora.yml | |
cp config/solr.yml.sample config/solr.yml | |
cp config/devise.yml.sample config/devise.yml | |
cp config/redis.yml.sample config/redis.yml | |
cp config/database.yml.sample config/database.yml | |
cp config/blacklight.yml.sample config/blacklight.yml | |
cp config/handle.yml.sample config/handle.yml | |
cp config/secrets.yml.sample config/secrets.yml | |
- name: Create database | |
run: | | |
RAILS_ENV=test bundle exec rake db:create | |
RAILS_ENV=test bundle exec rake db:migrate --trace | |
- name: Set up sipity | |
run: | | |
RAILS_ENV=test bundle exec rake hyrax:workflow:load | |
- name: Setup hyrax test environment | |
run: | | |
bundle exec rake hydra:test_server & | |
sleep 210 | |
- name: Rubocop | |
run: | | |
bundle exec rubocop | |
- name: Compile assets | |
run: | | |
bundle exec rails assets:precompile &> /dev/null | |
- name: Run tests | |
run: xvfb-run -a bundle exec rake spec | |
env: | |
RAILS_ENV: test | |
TMPDIR: /tmp | |
- name: Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} |