Skip to content

Commit f386990

Browse files
Merge pull request #166 from activeadmin/feature/github-actions
GitHub actions
2 parents bbcae43 + 5467d07 commit f386990

File tree

5 files changed

+51
-22
lines changed

5 files changed

+51
-22
lines changed

.github/workflows/codecheck.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Codecheck
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
jobs:
10+
codecheck:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: ruby/setup-ruby@v1
15+
with:
16+
ruby-version: 2.7
17+
bundler-cache: true
18+
- run: bundle exec rubocop

.github/workflows/tests.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
branches:
8+
- master
9+
jobs:
10+
test:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
os: [ubuntu-latest]
15+
ruby: [2.5, 2.6, 2.7]
16+
runs-on: ${{ matrix.os }}
17+
18+
services:
19+
mongodb:
20+
image: mongo
21+
ports:
22+
- 27017:27017
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
- uses: ruby/setup-ruby@v1
27+
with:
28+
ruby-version: ${{ matrix.ruby }}
29+
bundler-cache: true
30+
- run: bundle exec rake

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

README.md

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

56
## Updates
67

lib/activeadmin-mongoid.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,14 @@
99
# and thereby pushing ActiveAdmin::Generators::InstallGenerator to use our empty create_migrations method.
1010

1111
Rails::Generators::NamedBase.class_eval do
12-
1312
def create_migrations
1413
end
1514

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

20-
klass.class_eval do
19+
klass.class_eval do
2120
def self.method_added(method_name)
2221
super
2322
remove_method method_name if method_name == :create_migrations
@@ -26,4 +25,3 @@ def self.method_added(method_name)
2625
end
2726
end
2827
end
29-

0 commit comments

Comments
 (0)