Skip to content

Commit dd04ae1

Browse files
Github Actions (#250)
1 parent a78a831 commit dd04ae1

File tree

6 files changed

+117
-91
lines changed

6 files changed

+117
-91
lines changed

.github/workflows/test.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI RSpec Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
name: >-
8+
${{ matrix.ruby }}
9+
env:
10+
CI: true
11+
TESTOPTS: -v
12+
runs-on: ubuntu-latest
13+
continue-on-error: ${{ matrix.experimental }}
14+
strategy:
15+
fail-fast: true
16+
matrix:
17+
ruby: [2.5, 2.6, 2.7, 3.0, jruby] # truffleruby
18+
mongoid: [7]
19+
experimental: [false]
20+
include:
21+
- ruby: 2.3
22+
mongoid: 3
23+
experimental: true
24+
- ruby: 2.4
25+
mongoid: 4
26+
experimental: true
27+
- ruby: 2.5
28+
mongoid: 5
29+
experimental: true
30+
- ruby: 2.6
31+
mongoid: 6
32+
experimental: true
33+
- ruby: head
34+
mongoid: 7
35+
experimental: true
36+
- ruby: jruby-head
37+
mongoid: 7
38+
experimental: true
39+
# - ruby: truffleruby-head
40+
# mongoid: 7
41+
# experimental: true
42+
steps:
43+
- name: repo checkout
44+
uses: actions/checkout@v2
45+
- name: start mongodb
46+
uses: supercharge/mongodb-github-action@1.6.0
47+
with:
48+
mongodb-version: 4.4
49+
mongodb-replica-set: rs0
50+
- name: load ruby
51+
uses: ruby/setup-ruby@v1
52+
with:
53+
ruby-version: ${{ matrix.ruby }}
54+
bundler: 2
55+
- name: bundle install
56+
run: bundle install --jobs 4 --retry 3
57+
- name: test
58+
timeout-minutes: 10
59+
run: bundle exec rake spec
60+
continue-on-error: ${{ matrix.experimental }}

.travis.yml

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

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
### 0.8.4 (Next)
22

3+
* [#250](https://github.com/mongoid/mongoid-history/pull/250): Migrate to Github actions - [@johnnyshields](https://github.com/johnnyshields).
34
* [#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).
45
* [#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).
56
* Your contribution here.

CONTRIBUTING.md

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
Contributing to Mongoid-History
2-
===============================
1+
# Contributing to Mongoid-History
32

43
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).
54

6-
#### Fork the Project
5+
### Fork the Project
76

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

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

16-
#### Create a Topic Branch
15+
### Create a Topic Branch
1716

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

@@ -23,7 +22,7 @@ git pull upstream master
2322
git checkout -b my-feature-branch
2423
```
2524

26-
#### Bundle Install and Test
25+
### Bundle Install and Test
2726

2827
Ensure that you can build the project and run tests.
2928

@@ -32,29 +31,29 @@ bundle install
3231
bundle exec rake
3332
```
3433

35-
#### Write Tests
34+
### Write Tests
3635

3736
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).
3837

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

41-
#### Write Code
40+
### Write Code
4241

4342
Implement your feature or bug fix.
4443

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

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

49-
#### Write Documentation
48+
### Write Documentation
5049

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

53-
#### Update Changelog
52+
### Update Changelog
5453

5554
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.
5655

57-
#### Commit Changes
56+
### Commit Changes
5857

5958
Make sure git knows your name and email address:
6059

@@ -70,17 +69,17 @@ git add ...
7069
git commit
7170
```
7271

73-
#### Push
72+
### Push
7473

7574
```
7675
git push origin my-feature-branch
7776
```
7877

79-
#### Make a Pull Request
78+
### Make a Pull Request
8079

8180
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.
8281

83-
#### Rebase
82+
### Rebase
8483

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

@@ -90,7 +89,7 @@ git rebase upstream/master
9089
git push origin my-feature-branch -f
9190
```
9291

93-
#### Update CHANGELOG Again
92+
### Update CHANGELOG Again
9493

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

@@ -105,14 +104,14 @@ git commit --amend
105104
git push origin my-feature-branch -f
106105
```
107106

108-
#### Check on Your Pull Request
107+
### Check on Your Pull Request
109108

110109
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.
111110

112-
#### Be Patient
111+
### Be Patient
113112

114113
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!
115114

116-
#### Thank You
115+
### Thank You
117116

118117
Please do know that we really appreciate and value your time and work. We love you, really.

Gemfile

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,31 @@ source 'https://rubygems.org'
22

33
gemspec
44

5-
case version = ENV['MONGOID_VERSION'] || '~> 7.0.0'
5+
case version = ENV['MONGOID_VERSION'] || '~> 7.0'
66
when 'HEAD'
77
gem 'mongoid', github: 'mongodb/mongoid'
88
when /\b7/
9-
gem 'mongoid', '~> 7.0.0'
9+
gem 'mongoid', '~> 7.0'
1010
when /\b6/
11-
gem 'mongoid', '~> 6.0.0'
11+
gem 'mongoid', '~> 6.0'
1212
when /\b5/
1313
gem 'mongoid', '~> 5.0'
14-
gem 'mongoid-observers', '~> 0.2.0'
14+
gem 'mongoid-observers', '~> 0.2'
1515
when /\b4/
1616
gem 'mongoid', '~> 4.0'
17-
gem 'mongoid-observers', '~> 0.2.0'
17+
gem 'mongoid-observers', '~> 0.2'
1818
when /\b3/
19-
gem 'mongoid', '~> 3.1.7'
19+
gem 'mongoid', '~> 3.1'
2020
else
2121
gem 'mongoid', version
2222
end
23+
2324
gem 'mongoid-compatibility'
2425

2526
group :development, :test do
2627
gem 'bundler'
2728
gem 'pry'
28-
gem 'rake', '< 11.0'
29+
gem 'rake'
2930
end
3031

3132
group :test do

0 commit comments

Comments
 (0)