Skip to content

Commit

Permalink
Migrate CI to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarez-moreno-sergio committed Aug 18, 2023
1 parent 0614eb0 commit 7c8d066
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 27 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 mysql_framework.gemspec
gem push mysql_framework-*.gem
env:
GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
32 changes: 32 additions & 0 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: RSpec
on:
- push
jobs:
test:
runs-on: ubuntu-latest

services:
mysql:
image: mysql:5.7
redis:
image: redis:latest
ports:
- 6379:6379

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
26 changes: 0 additions & 26 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Mysql_Framework

[![Build Status](https://travis-ci.org/Sage/mysql_framework.svg?branch=master)](https://travis-ci.org/Sage/mysql_framework)
[![RSpec](https://github.com/Sage/mysql_framework/actions/workflows/rspec.yml/badge.svg)](https://github.com/Sage/mysql_framework/actions/workflows/rspec.yml)
[![Maintainability](https://api.codeclimate.com/v1/badges/36068a1f03ea88d08b86/maintainability)](https://codeclimate.com/github/Sage/mysql_framework/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/36068a1f03ea88d08b86/test_coverage)](https://codeclimate.com/github/Sage/mysql_framework/test_coverage)
[![Gem Version](https://badge.fury.io/rb/mysql_framework.svg)](https://badge.fury.io/rb/mysql_framework)
Expand Down

0 comments on commit 7c8d066

Please sign in to comment.