Skip to content

GitHub actions #166

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Aug 1, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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