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

Github Actions #250

Merged
merged 5 commits into from
Sep 18, 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
60 changes: 60 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: CI RSpec Test

on: [push, pull_request]

jobs:
build:
name: >-
${{ matrix.ruby }}
env:
CI: true
TESTOPTS: -v
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: true
matrix:
ruby: [2.5, 2.6, 2.7, 3.0, jruby] # truffleruby
mongoid: [7]
experimental: [false]
include:
- ruby: 2.3
mongoid: 3
experimental: true
- ruby: 2.4
mongoid: 4
experimental: true
- ruby: 2.5
mongoid: 5
experimental: true
- ruby: 2.6
mongoid: 6
experimental: true
- ruby: head
mongoid: 7
experimental: true
- ruby: jruby-head
mongoid: 7
experimental: true
# - ruby: truffleruby-head
# mongoid: 7
# experimental: true
steps:
- name: repo checkout
uses: actions/checkout@v2
- name: start mongodb
uses: supercharge/mongodb-github-action@1.6.0
with:
mongodb-version: 4.4
mongodb-replica-set: rs0
- name: load ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler: 2
- name: bundle install
run: bundle install --jobs 4 --retry 3
- name: test
timeout-minutes: 10
run: bundle exec rake spec
continue-on-error: ${{ matrix.experimental }}
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### 0.8.4 (Next)

* [#250](https://github.com/mongoid/mongoid-history/pull/250): Migrate to Github actions - [@johnnyshields](https://github.com/johnnyshields).
* [#249](https://github.com/mongoid/mongoid-history/pull/249): Don't update version on embedded documents if the document itself is being destroyed - [@getaroom](https://github.com/getaroom).
* [#248](https://github.com/mongoid/mongoid-history/pull/248): Don't update version on embedded documents if an ancestor is being destroyed in the same operation - [@getaroom](https://github.com/getaroom).
* Your contribution here.
Expand Down
33 changes: 16 additions & 17 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
Contributing to Mongoid-History
===============================
# Contributing to Mongoid-History

Mongoid-History is work of [many of contributors](https://github.com/mongoid/mongoid-history/graphs/contributors). You're encouraged to submit [pull requests](https://github.com/mongoid/mongoid-history/pulls), [propose features, ask questions and discuss issues](https://github.com/mongoid/mongoid-history/issues).

#### Fork the Project
### Fork the Project

Fork the [project on Github](https://github.com/mongoid/mongoid-history) and check out your copy.

Expand All @@ -13,7 +12,7 @@ cd mongoid-history
git remote add upstream https://github.com/mongoid/mongoid-history.git
```

#### Create a Topic Branch
### Create a Topic Branch

Make sure your fork is up-to-date and create a topic branch for your feature or bug fix.

Expand All @@ -23,7 +22,7 @@ git pull upstream master
git checkout -b my-feature-branch
```

#### Bundle Install and Test
### Bundle Install and Test

Ensure that you can build the project and run tests.

Expand All @@ -32,29 +31,29 @@ bundle install
bundle exec rake
```

#### Write Tests
### Write Tests

Try to write a test that reproduces the problem you're trying to fix or describes a feature that you want to build. Add to [spec/mongoid-history](spec/mongoid-history).

We definitely appreciate pull requests that highlight or reproduce a problem, even without a fix.

#### Write Code
### Write Code

Implement your feature or bug fix.

Ruby style is enforced with [Rubocop](https://github.com/bbatsov/rubocop), run `bundle exec rubocop` and fix any style issues highlighted.

Make sure that `bundle exec rake` completes without errors.

#### Write Documentation
### Write Documentation

Document any external behavior in the [README](README.md).

#### Update Changelog
### Update Changelog

Add a line to [CHANGELOG](CHANGELOG.md) under *Next Release*. Make it look like every other line, including your name and link to your Github account.

#### Commit Changes
### Commit Changes

Make sure git knows your name and email address:

Expand All @@ -70,17 +69,17 @@ git add ...
git commit
```

#### Push
### Push

```
git push origin my-feature-branch
```

#### Make a Pull Request
### Make a Pull Request

Go to https://github.com/contributor/mongoid-history and select your feature branch. Click the 'Pull Request' button and fill out the form. Pull requests are usually reviewed within a few days.

#### Rebase
### Rebase

If you've been working on a change for a while, rebase with upstream/master.

Expand All @@ -90,7 +89,7 @@ git rebase upstream/master
git push origin my-feature-branch -f
```

#### Update CHANGELOG Again
### Update CHANGELOG Again

Update the [CHANGELOG](CHANGELOG.md) with the pull request number. A typical entry looks as follows.

Expand All @@ -105,14 +104,14 @@ git commit --amend
git push origin my-feature-branch -f
```

#### Check on Your Pull Request
### Check on Your Pull Request

Go back to your pull request after a few minutes and see whether it passed muster with Travis-CI. Everything should look green, otherwise fix issues and amend your commit as described above.

#### Be Patient
### Be Patient

It's likely that your change will not be merged and that the nitpicky maintainers will ask you to do more, or fix seemingly benign problems. Hang on there!

#### Thank You
### Thank You

Please do know that we really appreciate and value your time and work. We love you, really.
15 changes: 8 additions & 7 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,31 @@ source 'https://rubygems.org'

gemspec

case version = ENV['MONGOID_VERSION'] || '~> 7.0.0'
case version = ENV['MONGOID_VERSION'] || '~> 7.0'
when 'HEAD'
gem 'mongoid', github: 'mongodb/mongoid'
when /\b7/
gem 'mongoid', '~> 7.0.0'
gem 'mongoid', '~> 7.0'
when /\b6/
gem 'mongoid', '~> 6.0.0'
gem 'mongoid', '~> 6.0'
when /\b5/
gem 'mongoid', '~> 5.0'
gem 'mongoid-observers', '~> 0.2.0'
gem 'mongoid-observers', '~> 0.2'
when /\b4/
gem 'mongoid', '~> 4.0'
gem 'mongoid-observers', '~> 0.2.0'
gem 'mongoid-observers', '~> 0.2'
when /\b3/
gem 'mongoid', '~> 3.1.7'
gem 'mongoid', '~> 3.1'
else
gem 'mongoid', version
end

gem 'mongoid-compatibility'

group :development, :test do
gem 'bundler'
gem 'pry'
gem 'rake', '< 11.0'
gem 'rake'
end

group :test do
Expand Down
Loading