Skip to content

Commit

Permalink
Merge pull request WGBH-MLA#629 from WGBH-MLA/github_actions
Browse files Browse the repository at this point in the history
GitHub Actions for CI
  • Loading branch information
afred authored Nov 15, 2021
2 parents 55ee094 + 620d672 commit 8fde4e3
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 69 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/ams-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: CI RSpec Tests

on: [push, pull_request]

jobs:
tests:
name: CI
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install Redis
run: sudo apt-get install -y redis-tools redis-server

- name: Install libcurl4-openssl-dev for Curb Gem
run: sudo apt-get install libcurl4-openssl-dev

- name: Setup Ruby and Install RubyGems
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.5.3
bundler-cache: true

- name: Install JDK
uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '11'

- name: Install Node
shell: bash -l -eo pipefail {0}
run: nvm install 12.9.0

- name: Install Chrome Browser
run: google-chrome-stable --headless --disable-gpu --no-sandbox --remote-debugging-port=9222 http://localhost &

- name: Prepare Test Environment
run: |
cp config/travis/solr_wrapper_test.yml config/solr_wrapper_test.yml
cp config/travis/fcrepo_wrapper_test.yml config/fcrepo_wrapper_test.yml
export DISPLAY=:99.0
RAILS_ENV=test bundle exec rake db:environment:set db:create db:migrate --trace
RAILS_ENV=test npm install yarn
RAILS_ENV=test yarn --ignore-engines install
RAILS_ENV=test bundle exec rake webpacker:compile
- name: Run Rspec specs using CI config
run: bundle exec rake ci
59 changes: 0 additions & 59 deletions .travis.yml

This file was deleted.

10 changes: 0 additions & 10 deletions app/controllers/api_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@ class APIController < ActionController::API
# JSON or PBCore XML.
include ActionController::MimeResponds

# Authenticate user before all actions.
# NOTE: For Basic HTTP auth to work:
# * the `http_authenticatable` config option for Devise must be set to true
# (see config/initializers/devise.rb).
# * The Authorization request header must be set to "Basic {cred}" where
# {cred} is the base64 encoded username:password.
before_action do
authenticate_user!
end

# Common API features here, e.g. auth.
rescue_from ActiveFedora::ObjectNotFoundError, with: :not_found

Expand Down

0 comments on commit 8fde4e3

Please sign in to comment.