Skip to content

Commit

Permalink
first pass at Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
ebenenglish committed Nov 7, 2024
1 parent 8437d28 commit a323b19
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 9 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby

name: CI

on: [push, pull_request]

permissions:
contents: read

jobs:
test:
runs-on: ubuntu-22.04
strategy:
matrix:
ruby-version: ['3.0']
rails_version: ["6.1.7.8"]
env:
ENGINE_CART_RAILS_OPTIONS: "--skip-git --skip-listen --skip-spring --skip-keeps --skip-coffee --skip-test"
steps:
- uses: actions/checkout@v4
- 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
# uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
with:
ruby-version: ${{ matrix.ruby-version }}
bundler: "latest"
- name: Install dependencies
run: bundle install
- name: Run linter and tests
run: bundle exec rake ci
10 changes: 5 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ if File.exist?(file)
Bundler.ui.warn e.message
end
else
Bundler.ui.warn "ENGINE_CART_DESTINATION: #{ENV.fetch('ENGINE_CART_DESTINATION') { 'ENGINE_CART_DESTINATION NOT SET' }}"
Bundler.ui.warn "RAILS_ROOT: #{ENV.fetch('RAILS_ROOT') { 'RAILS_ROOT NOT SET' }}"
Bundler.ui.warn "FILE EXPAND PATH = #{File.expand_path('.internal_test_app', File.dirname(__FILE__))}"
Bundler.ui.warn "CURRENT DIR: #{system 'pwd'}"
Bundler.ui.warn "WHAT IS IN INTERNAL_TEST_APP: #{system('ls ' + file.split('/')[0..-2].join('/'))}"
# Bundler.ui.warn "ENGINE_CART_DESTINATION: #{ENV.fetch('ENGINE_CART_DESTINATION') { 'ENGINE_CART_DESTINATION NOT SET' }}"
# Bundler.ui.warn "RAILS_ROOT: #{ENV.fetch('RAILS_ROOT') { 'RAILS_ROOT NOT SET' }}"
# Bundler.ui.warn "FILE EXPAND PATH = #{File.expand_path('.internal_test_app', File.dirname(__FILE__))}"
# Bundler.ui.warn "CURRENT DIR: #{system 'pwd'}"
# Bundler.ui.warn "WHAT IS IN INTERNAL_TEST_APP: #{system('ls ' + file.split('/')[0..-2].join('/'))}"
Bundler.ui.warn "[EngineCart] Unable to find test application dependencies in #{file}, using placeholder dependencies"
if ENV['RAILS_VERSION']
if ENV['RAILS_VERSION'] == 'edge'
Expand Down
8 changes: 4 additions & 4 deletions lib/generators/blacklight_iiif_search/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ def verify_blacklight_installed
return if IO.read('app/controllers/application_controller.rb').include?('include Blacklight::Controller')
say_status('info', 'BLACKLIGHT NOT INSTALLED; GENERATING BLACKLIGHT', :blue)

say_status('info', 'TEST APP GEMFILE LOOKS LIKE:')
system 'pwd'
system 'cat ./Gemfile'
system 'cat ./Gemfile.lock'
# say_status('info', 'TEST APP GEMFILE LOOKS LIKE:')
# system 'pwd'
# system 'cat ./Gemfile'
# system 'cat ./Gemfile.lock'
generate 'blacklight:install'
end

Expand Down

0 comments on commit a323b19

Please sign in to comment.