Skip to content
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
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ jobs:
- { ruby: '3.3', mongodb: '6', gemfile: 'mongoid-9.0' }
- { ruby: '3.4', mongodb: '7.0', gemfile: 'mongoid-9.0', bundler: '2.7.2' }
- { ruby: '3.4', mongodb: '8.0', gemfile: 'mongoid-9.0', bundler: '2.7.2' }
- { ruby: '4.0', mongodb: '8.0', gemfile: 'mongoid-9.0', bundler: '2.7.2' }
- { ruby: '4.0', mongodb: '8.0', gemfile: 'mongoid-9.0', bundler: '2.7.2', coverage: true }
name: test (ruby=${{ matrix.entry.ruby }}, mongodb=${{ matrix.entry.mongodb }}), gemfile=${{ matrix.entry.gemfile }})
env:
BUNDLE_GEMFILE: gemfiles/${{ matrix.entry.gemfile }}.gemfile
COVERAGE: ${{ matrix.entry.coverage && 'true' || 'false' }}
services:
mongodb:
image: mongo:${{ matrix.entry.mongodb }}
Expand All @@ -54,3 +55,9 @@ jobs:
bundler-cache: true
- name: Run tests
run: bundle exec rake
- name: Upload coverage to Coveralls
if: ${{ matrix.entry.coverage }}
uses: coverallsapp/github-action@v2
with:
file: coverage/.resultset.json
format: simplecov
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ Gemfile.lock
Gemfile.danger.lock
gemfiles/*.lock
pkg/*
coverage/
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### 2.6.1 (Next)

* [#85](https://github.com/mongoid/mongoid-grid_fs/pull/85): Report test coverage to Coveralls and update CI badges - [@dblock](https://github.com/dblock).
* [#84](https://github.com/mongoid/mongoid-grid_fs/pull/84): Migrate Danger to danger-pr-comment workflows - [@dblock](https://github.com/dblock).
* [#84](https://github.com/mongoid/mongoid-grid_fs/pull/84): Modernize CI through Ruby 4.0 and MongoDB 8 with Mongoid 9, use Bundler 2 for modern Rails, and explicitly load Logger for Rails 6 - [@dblock](https://github.com/dblock).
* Your contribution here.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ mongoid-grid_fs
---------------

[![Gem Version](https://badge.fury.io/rb/mongoid-grid_fs.svg)](https://badge.fury.io/rb/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)
[![CI](https://github.com/mongoid/mongoid-grid_fs/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/mongoid/mongoid-grid_fs/actions/workflows/ci.yml)
[![Coverage Status](https://coveralls.io/repos/github/mongoid/mongoid-grid_fs/badge.svg?branch=master)](https://coveralls.io/github/mongoid/mongoid-grid_fs?branch=master)

A pure Mongoid/Moped implementation of the MongoDB GridFS specification

Expand Down
1 change: 1 addition & 0 deletions gemfiles/mongoid-9.0.gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ gem 'rails', '~> 7.0'
gem 'base64'
gem 'bigdecimal'
gem 'logger'
gem 'simplecov', '~> 0.22', require: false if ENV['COVERAGE'] == 'true'

gemspec path: '../'
9 changes: 9 additions & 0 deletions test/helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
if ENV['COVERAGE'] == 'true'
require 'simplecov'
SimpleCov.start do
add_filter '/test/'
add_filter '/vendor/'
track_files 'lib/**/*.rb'
end
end

require 'logger'
require 'rails'
require 'stringio'
Expand Down
Loading