From ccbc02712dedb5b6ac045dd7a3acd49faf26d644 Mon Sep 17 00:00:00 2001 From: Brandon Dunne Date: Wed, 9 Feb 2022 14:21:53 -0500 Subject: [PATCH] Switch to GitHub Actions (cherry picked from commit f1a9e601a9e45fdfac42dcd2a2e55843de3543fe) --- .github/workflows/ci.yaml | 27 +++++++++++++++++++++++++++ .travis.yml | 20 -------------------- README.md | 4 +++- bin/before_install | 7 +++++++ 4 files changed, 37 insertions(+), 21 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml create mode 100755 bin/before_install diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..a8d016b31 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,27 @@ +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: Before install + run: bin/before_install + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: '1.14' + - name: Run tests + run: bundle exec rake diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index a8cfee0d3..000000000 --- a/.travis.yml +++ /dev/null @@ -1,20 +0,0 @@ ---- -language: ruby -dist: bionic -rvm: -- 2.6.6 -- 2.7.2 -arch: -- amd64 -- ppc64le -cache: - bundler: true - directories: - - "$HOME/.cache/go-build" - - "$HOME/gopath/pkg/mod" -before_script: -- eval "$(gimme 1.18)" -- travis_wait curl -L https://github.com/operator-framework/operator-sdk/releases/download/v0.18.2/operator-sdk-v0.18.2-$(uname - -m)-linux-gnu -o /home/travis/bin/operator-sdk && chmod +x /home/travis/bin/operator-sdk -script: -- bundle exec rspec diff --git a/README.md b/README.md index 79c230d8b..3abb54e14 100644 --- a/README.md +++ b/README.md @@ -1,8 +1,10 @@ # Deploy ManageIQ on OpenShift -[![Build Status](https://travis-ci.com/ManageIQ/manageiq-pods.svg?branch=morphy)](https://travis-ci.com/ManageIQ/manageiq-pods) +[![CI](https://github.com/ManageIQ/manageiq-pods/actions/workflows/ci.yaml/badge.svg)](https://github.com/ManageIQ/manageiq-pods/actions/workflows/ci.yaml) [![Join the chat at https://gitter.im/ManageIQ/manageiq-pods](https://badges.gitter.im/ManageIQ/manageiq-pods.svg)](https://gitter.im/ManageIQ/manageiq-pods?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Build history for master branch](https://buildstats.info/github/chart/ManageIQ/manageiq-pods?branch=master&buildCount=50&includeBuildsFromPullRequest=false&showstats=false)](https://github.com/ManageIQ/manageiq-pods/actions?query=branch%3Amaster) + **This guide will demo deploying ManageIQ in OpenShift as its example use-case but this method could actually be used in a different container cluster environment** ## Purpose diff --git a/bin/before_install b/bin/before_install new file mode 100755 index 000000000..5e9457e2c --- /dev/null +++ b/bin/before_install @@ -0,0 +1,7 @@ +#!/bin/bash + +if [ -n "$CI" ]; then + echo "== Installing operator-sdk ==" + curl -L https://github.com/operator-framework/operator-sdk/releases/download/v0.18.2/operator-sdk-v0.18.2-$(uname -m)-linux-gnu -o /usr/local/bin/operator-sdk + chmod +x /usr/local/bin/operator-sdk +fi