From 2a9ceda6b5b9c360cb2539db542ca14f3d81f48f Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Sat, 19 Feb 2022 19:31:10 +1300 Subject: [PATCH 1/6] Restrict docker publish to ytti's repo --- .github/workflows/publishdocker.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/publishdocker.yml b/.github/workflows/publishdocker.yml index f3492519b..bb8cb7394 100644 --- a/.github/workflows/publishdocker.yml +++ b/.github/workflows/publishdocker.yml @@ -2,6 +2,7 @@ name: Publish Docker on: [push] jobs: build: + if: github.repository_owner == 'ytti' runs-on: ubuntu-latest steps: - uses: actions/checkout@master From f5f0af23c64bf4d576cd3cf1cc199d88456bf93c Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Sat, 19 Feb 2022 19:34:37 +1300 Subject: [PATCH 2/6] Create Ruby build action --- .github/workflows/ruby.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/ruby.yml diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml new file mode 100644 index 000000000..e26f6edf7 --- /dev/null +++ b/.github/workflows/ruby.yml @@ -0,0 +1,35 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake +# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby + +name: Ruby + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + test: + + runs-on: ubuntu-latest + strategy: + matrix: + ruby-version: ['2.6', '2.7', '3.0'] + + steps: + - uses: actions/checkout@v2 + - name: Set up Ruby + # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby, + # change this to (see https://github.com/ruby/setup-ruby#versioning): + # uses: ruby/setup-ruby@v1 + uses: ruby/setup-ruby@473e4d8fe5dd94ee328fdfca9f8c9c7afc9dae5e + with: + ruby-version: ${{ matrix.ruby-version }} + bundler-cache: true # runs 'bundle install' and caches installed gems automatically + - name: Run tests + run: bundle exec rake From 344755add7d09a25a03820a60317830c3474280a Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Sat, 19 Feb 2022 19:40:04 +1300 Subject: [PATCH 3/6] Run Ruby action on all branches --- .github/workflows/ruby.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index e26f6edf7..99212dcc3 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -7,11 +7,11 @@ name: Ruby -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] +on: [ push, pull_request ] +# push: +# branches: [ master ] +# pull_request: +# branches: [ master ] jobs: test: From 7b47e5fba52530ed15b3d0127af406754e16eb36 Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Sat, 19 Feb 2022 20:02:28 +1300 Subject: [PATCH 4/6] Delete .travis.yml --- .travis.yml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 990443b03..000000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: ruby -sudo: false -cache: bundler -before_install: - - gem install bundler -rvm: - - 2.3 - - 2.4 - - 2.5 - - 2.6 From 11a3081d2377f35b91bcae6c9dc18fbc36b36f60 Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Sat, 19 Feb 2022 20:03:37 +1300 Subject: [PATCH 5/6] Rename Ruby workflow to CI --- .github/workflows/ruby.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ruby.yml b/.github/workflows/ruby.yml index 99212dcc3..06e0aae47 100644 --- a/.github/workflows/ruby.yml +++ b/.github/workflows/ruby.yml @@ -5,7 +5,7 @@ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby -name: Ruby +name: CI on: [ push, pull_request ] # push: From 4f98362600949a7d6a889965b1219209c30d7f4b Mon Sep 17 00:00:00 2001 From: Mike Beattie Date: Sat, 19 Feb 2022 20:09:11 +1300 Subject: [PATCH 6/6] Update CI badge from Travis to Github Actions. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d68f9ca1..817cab9f2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Oxidized -[![Build Status](https://api.travis-ci.com/ytti/oxidized.svg)](https://travis-ci.com/ytti/oxidized) +[![Build Status](https://github.com/ytti/oxidized/actions/workflows/ruby.yml/badge.svg)](https://github.com/ytti/oxidized/actions/workflows/ruby.yml) [![codecov.io](https://codecov.io/gh/ytti/oxidized/coverage.svg?branch=master)](https://codecov.io/gh/ytti/oxidized?branch=master) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/5a90cb22db6a4d5ea23ad0dfb53fe03a)](https://www.codacy.com/app/ytti/oxidized?utm_source=github.com&utm_medium=referral&utm_content=ytti/oxidized&utm_campaign=Badge_Grade) [![Code Climate](https://codeclimate.com/github/ytti/oxidized/badges/gpa.svg)](https://codeclimate.com/github/ytti/oxidized)