Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions #760

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/ov-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
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 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.4.4
bundler-cache: true

- name: Start Rails
run: nohup bundle exec rails server &

- name: Run Rspec specs using CI config
run: bundle exec rake ci_specs

- name: Run Rubocop code analyzer and Formatter
run: bundle exec rubocop -D
4 changes: 2 additions & 2 deletions lib/tasks/ci.rake → lib/tasks/ci_specs.rake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if Rails && !Rails.env.production?
require 'rspec/core/rake_task'

desc 'Run tests as if on CI server'
task :ci do
task :ci_specs do
require 'jettywrapper'

# Set the version of hydra-jetty we want, and download a clean copy of it.
Expand All @@ -26,7 +26,7 @@ if Rails && !Rails.env.production?
# running the code in the block passed to it.
error = Jettywrapper.wrap(jetty_params) do
task = RSpec::Core::RakeTask.new(:spec)
task.rspec_opts = '--tag ~not_on_travis'
task.rspec_opts = '--tag ~not_on_ci'
task.run_task(true)
end
fail "test failures: #{error}" if error
Expand Down
2 changes: 1 addition & 1 deletion spec/aws/s3_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
require 'rails_helper'

describe 'S3' do
describe 'policy implementation', not_on_travis: true do
describe 'policy implementation', not_on_ci: true do
def to_pretty_json(string_io)
JSON.pretty_generate(JSON.parse(string_io.string))
end
Expand Down