Skip to content

Commit 122c296

Browse files
authored
Merge pull request #332 from lardawge/ls/switch-ci-to-github-workflows
Switch ci to GitHub workflows
2 parents 7dd76ec + 73d5536 commit 122c296

File tree

4 files changed

+45
-23
lines changed

4 files changed

+45
-23
lines changed

.github/workflows/ruby-ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Ruby CI
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
ruby: ['3.0', '3.1', '3.2', '3.4', '3.5', 'ruby-head']
16+
queue_adapter: ['sidekiq', 'active_job']
17+
continue-on-error: ${{ matrix.ruby == 'ruby-head' }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Install ImageMagick
22+
run: sudo apt-get update && sudo apt-get install -y imagemagick
23+
24+
- name: Set up Ruby
25+
uses: ruby/setup-ruby@v1
26+
with:
27+
ruby-version: ${{ matrix.ruby }}
28+
bundler-cache: true
29+
30+
- name: Update RubyGems
31+
run: yes | gem update --system --force
32+
33+
- name: Install Bundler
34+
run: gem install bundler
35+
36+
- name: Set QUEUE_ADAPTER env
37+
run: echo "QUEUE_ADAPTER=${{ matrix.queue_adapter }}" >> $GITHUB_ENV
38+
39+
- name: Install dependencies
40+
run: bundle install --jobs 4 --retry 3
41+
42+
- name: Run tests
43+
run: bundle exec rake

.travis.yml

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# CarrierWave Backgrounder
22

3-
[![Build Status](https://app.travis-ci.com/lardawge/carrierwave_backgrounder.svg?branch=master)](https://app.travis-ci.com/lardawge/carrierwave_backgrounder)
3+
[![Build Status](https://github.com/lardawge/carrierwave_backgrounder/actions/workflows/ruby-ci.yml/badge.svg)](https://github.com/lardawge/carrierwave_backgrounder/actions/workflows/ruby-ci.yml)
44
[![Code Climate](https://codeclimate.com/github/lardawge/carrierwave_backgrounder.png)](https://codeclimate.com/github/lardawge/carrierwave_backgrounder)
55

66
NOTICE: Version 1.0.0 contains breaking changes if you are coming from an earlier version.

spec/backgrounder/orm/activemodel_spec.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
require 'spec_helper'
2-
require 'ostruct'
32
require 'backgrounder/orm/activemodel'
43

54
RSpec.describe CarrierWave::Backgrounder::ORM::ActiveModel do
@@ -9,7 +8,7 @@ def self.before_save(method, opts); nil; end
98
def self.after_commit(method, opts); nil; end
109
def avatar_changed?; nil; end
1110
def avatar_present?; true; end
12-
def remote_avatar_url; OpenStruct.new(:present? => true); end
11+
def remote_avatar_url; true; end
1312
def remove_avatar?; false; end
1413
def previous_changes; {}; end
1514
def self.uploader_options; {}; end

0 commit comments

Comments
 (0)