Skip to content
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

CI: add github ci workflow #44

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
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
30 changes: 30 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
mongodb: [4.0, 5.0, 6.0, 7.0, 8.0]
ruby: [2.7, 3.0, 3.1, 3.2, 3.3]
gemfile:
- mongoid_6
- mongoid_7
- mongoid_8
- mongoid_9
name: Ruby ${{ matrix.ruby }} with ${{ matrix.gemfile }} and mongodb ${{ matrix.mongodb }}
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
steps:
- name: Set up MongoDB ${{ matrix.mongodb }}
uses: supercharge/[email protected]
with:
mongodb-version: ${{ matrix.mongodb }}
- uses: actions/checkout@v4
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Run tests
run: bundle exec rake
14 changes: 6 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
A mongoid plugin to add auto incrementing fields to your documents.

[![Inline docs](
http://inch-ci.org/github/suweller/mongoid-autoinc.svg?branch=master&style=flat
)](http://inch-ci.org/github/suweller/mongoid-autoinc)
[![Code Climate](
http://img.shields.io/codeclimate/github/suweller/mongoid-autoinc.svg?style=flat
)](https://codeclimate.com/github/suweller/mongoid-autoinc)
https://inch-ci.org/github/suweller/mongoid-autoinc.svg?branch=master&style=flat
)](https://inch-ci.org/github/suweller/mongoid-autoinc)
[![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/suweller/mongoid-autoinc)](https://codeclimate.com/github/suweller/mongoid-autoinc)
[![Build Status](
http://img.shields.io/travis/suweller/mongoid-autoinc.svg?style=flat
)](https://travis-ci.org/suweller/mongoid-autoinc)
https://github.com/suweller/mongoid-autoinc/actions/workflows/ci.yml/badge.svg?branch=master
)](https://github.com/suweller/mongoid-autoinc/actions)

## Installation

Expand Down Expand Up @@ -172,7 +170,7 @@ increments :number, step: -> { 1 + rand(10) }
```
$ gem install bundler (if you don't have it)
$ bundle install
$ bundle exec spec
$ bundle exec rake
```

## Contributing
Expand Down
6 changes: 0 additions & 6 deletions gemfiles/mongoid_5.gemfile

This file was deleted.

5 changes: 5 additions & 0 deletions gemfiles/mongoid_6.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source "https://rubygems.org"

gem "mongoid", "~> 6.0"

gemspec path: "../"
5 changes: 5 additions & 0 deletions gemfiles/mongoid_7.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source "https://rubygems.org"

gem "mongoid", "~> 7.0"

gemspec path: "../"
5 changes: 5 additions & 0 deletions gemfiles/mongoid_8.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source "https://rubygems.org"

gem "mongoid", "~> 8.0"

gemspec path: "../"
5 changes: 5 additions & 0 deletions gemfiles/mongoid_9.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source "https://rubygems.org"

gem "mongoid", "~> 9.0"

gemspec path: "../"
2 changes: 1 addition & 1 deletion mongoid-autoinc.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.test_files = s.files.grep(%r(^(test|spec|features)/))
s.require_path = 'lib'

s.add_dependency 'mongoid', ['>= 6.0', '< 9.0']
s.add_dependency 'mongoid', ['>= 6.0', '< 10.0']

s.add_development_dependency 'rake'
s.add_development_dependency 'foreman'
Expand Down