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

Fix: CI. #81

Merged
merged 2 commits into from
Jan 19, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
34 changes: 13 additions & 21 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,31 @@
name: CI
on:
push:
branches: [master]
pull_request:
branches: [master]
on: [push, pull_request]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
mongodb: ["4.4"]
ruby: ["2.5", "2.6", "2.7", "3.0"]
gemfile:
- mongoid-3.1
- mongoid-4.0
- mongoid-5.0
- mongoid-6.0
- mongoid-7.0
- mongoid-8.0

entry:
- { ruby: '2.6', mongodb: '4.4', gemfile: 'mongoid-4.0', bundler: '1.17.3' }
- { ruby: '2.7', mongodb: '4.4', gemfile: 'mongoid-5.0', bundler: '1.17.3' }
- { ruby: '2.7', mongodb: '4.4', gemfile: 'mongoid-6.0' }
- { ruby: '2.7', mongodb: '4.4', gemfile: 'mongoid-7.0' }
- { ruby: '3.1', mongodb: '4.4', gemfile: 'mongoid-8.0' }
name: test (ruby=${{ matrix.entry.ruby }}, mongodb=${{ matrix.entry.mongodb }}), gemfile=${{ matrix.entry.gemfile }})
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.gemfile }}.gemfile
BUNDLE_GEMFILE: gemfiles/${{ matrix.entry.gemfile }}.gemfile
steps:
- name: Set up MongoDB ${{ matrix.mongodb }}
- name: Set up MongoDB ${{ matrix.entry.mongodb }}
uses: supercharge/mongodb-github-action@1.8.0
with:
mongodb-version: ${{ matrix.mongodb }}
# https://github.com/marketplace/actions/checkout
mongodb-version: ${{ matrix.entry.mongodb }}
- uses: actions/checkout@v2
# https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
ruby-version: ${{ matrix.entry.ruby }}
bundler: '${{ matrix.entry.bundler || 1 }}'
bundler-cache: true
- name: Run tests
run: bundle exec rake
19 changes: 19 additions & 0 deletions .github/workflows/danger.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: PR Linter
on: [pull_request]
jobs:
danger:
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: ${{ github.workspace }}/Gemfile.danger
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.7
bundler-cache: true
- run: |
# the personal token is public, this is ok, base64 encode to avoid tripping Github
TOKEN=$(echo -n Z2hwX0xNQ3VmanBFeTBvYkZVTWh6NVNqVFFBOEUxU25abzBqRUVuaAo= | base64 --decode)
DANGER_GITHUB_API_TOKEN=$TOKEN bundle exec danger --verbose
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### 2.4.1 (Next)

* [#81](https://github.com/mongoid/mongoid-grid_fs/pull/81): Mongoid 8 support - [@dblock](https://github.com/dblock), [@rmm5t](https://github.com/rmm5t).
* [#81](https://github.com/mongoid/mongoid-grid_fs/pull/81): Dropped support for Mongoid 3 - [@dblock](https://github.com/dblock), [@rmm5t](https://github.com/rmm5t).
* Your contribution here.

### 2.4.0 (2018/07/11)
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ git push origin my-feature-branch -f

#### 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.
Go back to your pull request after a few minutes and see whether it passed muster with CI. Everything should look green, otherwise fix issues and amend your commit as described above.

#### Be Patient

Expand Down
5 changes: 5 additions & 0 deletions Gemfile.danger
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source 'https://rubygems.org'

group :test do
gem 'mongoid-danger', '~> 0.2.0'
end
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ mongoid-grid_fs
---------------

[![Gem Version](https://badge.fury.io/rb/mongoid-grid_fs.svg)](https://badge.fury.io/rb/mongoid-grid_fs)
[![Build Status](https://travis-ci.org/mongoid/mongoid-grid_fs.svg)](https://travis-ci.org/mongoid/mongoid-grid_fs)
[![CI](https://github.com/mongoid/mongoid-grid_fs/actions/workflows/ci.yml/badge.svg)](https://github.com/mongoid/mongoid-grid_fs/actions/workflows/ci.yml)

A pure Mongoid/Moped implementation of the MongoDB GridFS specification

Expand Down
6 changes: 0 additions & 6 deletions gemfiles/mongoid-3.1.gemfile

This file was deleted.

1 change: 1 addition & 0 deletions gemfiles/mongoid-5.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@ source 'https://rubygems.org'

gem 'mongoid', '~> 5.0.0'
gem 'rails', '~> 4.0'
gem 'bigdecimal', '~> 1.3'

gemspec path: '../'