diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..3c8c94a3 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,24 @@ +name: CI + +on: [push, pull_request] + +jobs: + ci: + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: + - '2.6' + - '2.7' + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + working-directory: scripts + bundler-cache: true + - name: Prepare tests + run: bin/setup + - name: Run tests + run: bundle exec rake diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 7725b59f..00000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -language: ruby -rvm: -- 2.6.6 -- 2.7.2 -matrix: {} -fast_finish: true -cache: bundler -script: rake spec -install: pushd scripts && bundle install --jobs=3 --retry=3 && popd -dist: bionic diff --git a/README.md b/README.md index 70ca87b3..f1fc21b4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ManageIQ Appliance Build -[![Build Status](https://api.travis-ci.com/ManageIQ/manageiq-appliance-build.svg)](https://travis-ci.com/ManageIQ/manageiq-appliance-build) +[![CI](https://github.com/ManageIQ/manageiq-appliance-build/actions/workflows/ci.yaml/badge.svg)](https://github.com/ManageIQ/manageiq-appliance-build/actions/workflows/ci.yaml) [![License](http://img.shields.io/badge/license-APACHE2-blue.svg)](https://www.apache.org/licenses/LICENSE-2.0.html) # Introduction diff --git a/Rakefile b/Rakefile index 83304420..3c857125 100644 --- a/Rakefile +++ b/Rakefile @@ -1 +1,3 @@ Dir.glob(File.expand_path("lib/tasks/*", __dir__)).sort.each { |f| load f } + +task :default => :spec diff --git a/bin/setup b/bin/setup new file mode 100755 index 00000000..ce7b2246 --- /dev/null +++ b/bin/setup @@ -0,0 +1,7 @@ +#!/bin/bash + +if [ -n "$CI" ]; then + repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." &>/dev/null && pwd)" + + cp "$repo_root/scripts/Gemfile.lock" "$repo_root/Gemfile.lock" +fi