Skip to content

Commit

Permalink
Merge pull request #166 from activeadmin/feature/github-actions
Browse files Browse the repository at this point in the history
GitHub actions
  • Loading branch information
grzegorz-jakubiak authored Aug 1, 2021
2 parents bbcae43 + 5467d07 commit f386990
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 22 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/codecheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Codecheck
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
codecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- run: bundle exec rubocop
30 changes: 30 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Tests
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
ruby: [2.5, 2.6, 2.7]
runs-on: ${{ matrix.os }}

services:
mongodb:
image: mongo
ports:
- 27017:27017

steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- run: bundle exec rake
18 changes: 0 additions & 18 deletions .travis.yml

This file was deleted.

3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# ActiveAdmin-Mongoid
[![Version ][rubygems_badge]][rubygems]
[![Build Status](https://travis-ci.org/activeadmin/activeadmin-mongoid.svg?branch=master)](https://travis-ci.org/activeadmin/activeadmin-mongoid)
![Tests](https://github.com/activeadmin/activeadmin-mongoid/actions/workflows/tests.yml/badge.svg)
![Codecheck](https://github.com/activeadmin/activeadmin-mongoid/actions/workflows/codecheck.yml/badge.svg)

## Updates

Expand Down
4 changes: 1 addition & 3 deletions lib/activeadmin-mongoid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,14 @@
# and thereby pushing ActiveAdmin::Generators::InstallGenerator to use our empty create_migrations method.

Rails::Generators::NamedBase.class_eval do

def create_migrations
end

def self.inherited(klass)
super
if klass.name == "ActiveAdmin::Generators::InstallGenerator"

klass.class_eval do
klass.class_eval do
def self.method_added(method_name)
super
remove_method method_name if method_name == :create_migrations
Expand All @@ -26,4 +25,3 @@ def self.method_added(method_name)
end
end
end

0 comments on commit f386990

Please sign in to comment.