From c41b6622070d6f8dc74acc61f3623408e976aceb Mon Sep 17 00:00:00 2001 From: Jason Frey Date: Fri, 4 Feb 2022 12:24:11 -0500 Subject: [PATCH] Switch to GitHub Actions --- .github/workflows/ci.yaml | 40 +++++++++++++++++++++++++++++++ .travis.yml | 11 --------- README.md | 2 +- bin/ci/after_script | 3 --- manageiq-providers-amazon.gemspec | 2 +- 5 files changed, 42 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .travis.yml delete mode 100755 bin/ci/after_script diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 000000000..0481299b8 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,40 @@ +name: CI + +on: [push, pull_request] + +jobs: + ci: + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: + - '2.6' + - '2.7' + services: + postgres: + image: manageiq/postgresql:10 + env: + POSTGRESQL_USER: root + POSTGRESQL_PASSWORD: smartvm + POSTGRESQL_DATABASE: vmdb_test + options: --health-cmd pg_isready --health-interval 2s --health-timeout 5s --health-retries 5 + ports: + - 5432:5432 + env: + PGHOST: localhost + CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }} + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true + - name: Prepare tests + run: bin/setup + - name: Run tests + run: bundle exec rake + - name: Report code coverage + if: ${{ github.ref == 'refs/heads/master' && matrix.ruby-version == '2.7' }} + continue-on-error: true + uses: paambaati/codeclimate-action@v3.0.0 diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 474c126e1..000000000 --- a/.travis.yml +++ /dev/null @@ -1,11 +0,0 @@ ---- -language: ruby -cache: bundler -rvm: -- 2.6.6 -- 2.7.2 -addons: - postgresql: '10' -install: bin/setup -after_script: bin/ci/after_script -dist: bionic diff --git a/README.md b/README.md index f10f67a76..fcbfadad8 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # ManageIQ::Providers::Amazon -[![Build Status](https://travis-ci.com/ManageIQ/manageiq-providers-amazon.svg?branch=master)](https://travis-ci.com/github/ManageIQ/manageiq-providers-amazon) +[![CI](https://github.com/ManageIQ/manageiq-providers-amazon/actions/workflows/ci.yaml/badge.svg)](https://github.com/ManageIQ/manageiq-providers-amazon/actions/workflows/ci.yaml) [![Maintainability](https://api.codeclimate.com/v1/badges/61cfeaf47807735b8bd8/maintainability)](https://codeclimate.com/github/ManageIQ/manageiq-providers-amazon/maintainability) [![Test Coverage](https://api.codeclimate.com/v1/badges/61cfeaf47807735b8bd8/test_coverage)](https://codeclimate.com/github/ManageIQ/manageiq-providers-amazon/test_coverage) diff --git a/bin/ci/after_script b/bin/ci/after_script deleted file mode 100755 index c2a335bcc..000000000 --- a/bin/ci/after_script +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT diff --git a/manageiq-providers-amazon.gemspec b/manageiq-providers-amazon.gemspec index 579dc8872..f6f840467 100644 --- a/manageiq-providers-amazon.gemspec +++ b/manageiq-providers-amazon.gemspec @@ -31,5 +31,5 @@ Gem::Specification.new do |spec| spec.add_dependency "aws-sdk-sqs", "~> 1.0" spec.add_development_dependency "manageiq-style" - spec.add_development_dependency "simplecov" + spec.add_development_dependency "simplecov", ">= 0.21.2" end