Skip to content

Commit

Permalink
Migrate Travis CI to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
guille-sage committed Oct 6, 2021
1 parent addbb65 commit de093d8
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 28 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Publish Gem
on:
release:
types:
- "created"

jobs:
publish:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Publish to RubyGems
run: |
mkdir -p $HOME/.gem
touch $HOME/.gem/credentials
chmod 0600 $HOME/.gem/credentials
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
gem build class_kit.gemspec
gem push class_kit-*.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
24 changes: 24 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: RSpec
on:
- push
jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.4
bundler-cache: true

- name: Run tests
run: bundle exec rspec

- name: Code Coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: |
${{github.workspace}}/coverage/.resultset.json:simplecov
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

2 changes: 0 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,3 @@ source 'http://rubygems.org'

# Specify your gem's dependencies in class_kit.gemspec
gemspec

gem 'json', '1.8.3'
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ClassKit

[![Build Status](https://travis-ci.org/Sage/class_kit.svg?branch=master)](https://travis-ci.org/Sage/class_kit)
[![RSpec](https://github.com/Sage/class_kit/actions/workflows/rspec.yml/badge.svg)](https://github.com/Sage/class_kit/actions/workflows/rspec.yml)
[![Maintainability](https://api.codeclimate.com/v1/badges/0bc83e414eed8759a0e8/maintainability)](https://codeclimate.com/github/Sage/class_kit/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/0bc83e414eed8759a0e8/test_coverage)](https://codeclimate.com/github/Sage/class_kit/test_coverage)
[![Gem Version](https://badge.fury.io/rb/class_kit.svg)](https://badge.fury.io/rb/class_kit)
Expand Down
4 changes: 2 additions & 2 deletions class_kit.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.add_development_dependency 'bundler', '~> 1.11'
spec.add_development_dependency 'bundler', '~> 2'
spec.add_development_dependency 'pry'
spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'rspec'
spec.add_development_dependency 'simplecov'
spec.add_development_dependency 'simplecov', '< 0.18.0'

spec.add_dependency 'hash_kit'
spec.add_dependency 'json'
Expand Down

0 comments on commit de093d8

Please sign in to comment.