diff --git a/.github/workflows/ov-ci.yml b/.github/workflows/ov-ci.yml new file mode 100644 index 00000000..c27f3dcc --- /dev/null +++ b/.github/workflows/ov-ci.yml @@ -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 diff --git a/lib/tasks/ci.rake b/lib/tasks/ci_specs.rake similarity index 94% rename from lib/tasks/ci.rake rename to lib/tasks/ci_specs.rake index 133c01f2..2710e628 100644 --- a/lib/tasks/ci.rake +++ b/lib/tasks/ci_specs.rake @@ -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. @@ -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 diff --git a/spec/aws/s3_spec.rb b/spec/aws/s3_spec.rb index 2fbf6216..8bce964d 100644 --- a/spec/aws/s3_spec.rb +++ b/spec/aws/s3_spec.rb @@ -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