Skip to content

Commit

Permalink
Merge pull request #4 from jiikko/ci
Browse files Browse the repository at this point in the history
Use github actions
  • Loading branch information
ubibot authored Nov 28, 2022
2 parents a9beadd + 350c53e commit 7b655e9
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 36 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ruby.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Ruby

on:
push:
branches:
- master
pull_request:
types:
- opened
- synchronize
- reopened

jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
ruby-version: ['2.7', '3.0', '3.1']
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
bundler-cache: true
- name: Install Redis
run: sudo apt-get install -y redis-tools redis-server
- name: Verify that redis is up
run: redis-cli ping
- name: Run tests
run: |-
bundle exec rake
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM ruby:3.0
WORKDIR /app
RUN apt-get update && apt-get install redis -y
RUN bundle config set --global force_ruby_platform true
RUN gem i bundler
COPY . .
52 changes: 28 additions & 24 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,49 +1,53 @@
PATH
remote: .
specs:
resque_unit_without_mock (0.1.0)
resque_unit_without_mock (0.1.1)

GEM
remote: https://rubygems.org/
specs:
minitest (5.11.3)
connection_pool (2.3.0)
minitest (5.16.3)
minitest-hooks (1.5.0)
minitest (> 5.3)
mono_logger (1.1.0)
multi_json (1.13.1)
mustermann (1.0.3)
rack (2.0.6)
rack-protection (2.0.5)
mono_logger (1.1.1)
multi_json (1.15.0)
mustermann (3.0.0)
ruby2_keywords (~> 0.0.1)
rack (2.2.4)
rack-protection (3.0.3)
rack
rake (10.5.0)
redis (4.1.0)
redis-namespace (1.6.0)
redis (>= 3.0.4)
resque (2.0.0)
rake (13.0.6)
redis (5.0.5)
redis-client (>= 0.9.0)
redis-client (0.11.2)
connection_pool
redis-namespace (1.9.0)
redis (>= 4)
resque (2.4.0)
mono_logger (~> 1.0)
multi_json (~> 1.0)
redis-namespace (~> 1.6)
sinatra (>= 0.9.2)
vegas (~> 0.1.2)
sinatra (2.0.5)
mustermann (~> 1.0)
rack (~> 2.0)
rack-protection (= 2.0.5)
ruby2_keywords (0.0.5)
sinatra (3.0.3)
mustermann (~> 3.0)
rack (~> 2.2, >= 2.2.4)
rack-protection (= 3.0.3)
tilt (~> 2.0)
tilt (2.0.9)
vegas (0.1.11)
rack (>= 1.0.0)
tilt (2.0.11)

PLATFORMS
ruby
x86_64-linux

DEPENDENCIES
bundler (~> 1.17)
minitest (~> 5.0)
bundler
minitest
minitest-hooks
rake (~> 10.0)
rake
resque
resque_unit_without_mock!

BUNDLED WITH
1.17.1
2.3.26
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ end
Resque.singleton_class.prepend(ResqueHelpersExt)
```

## Development
* docker compose run --rm app bash
* bundle install
* bundle exec rake

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
11 changes: 11 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: '3'
services:
app:
build: .
volumes:
- './:/app:delegated'
- bundle_path:/bundle
environment:
- BUNDLE_PATH=/bundle
volumes:
bundle_path:
8 changes: 4 additions & 4 deletions resque_unit_without_mock.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

lib = File.expand_path("../lib", __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "resque_unit_without_mock/version"
Expand All @@ -13,6 +12,7 @@ Gem::Specification.new do |spec|
spec.description = spec.summary
spec.homepage = "https://github.com/jiikko/resque_unit_without_mock"
spec.license = "MIT"
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
Expand All @@ -23,9 +23,9 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_development_dependency "bundler", "~> 1.17"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "minitest", "~> 5.0"
spec.add_development_dependency "bundler"
spec.add_development_dependency "rake"
spec.add_development_dependency "minitest"
spec.add_development_dependency "minitest-hooks"
spec.add_development_dependency "resque"
end
2 changes: 1 addition & 1 deletion test/support/resque.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Resque.redis = Redis.new(host: 'localhost', port: RedisManeger::PORT, thread_safe: true)
Resque.redis = Redis.new(host: 'localhost', port: RedisManeger::PORT)

module ResqueHelpersExt
def reset!
Expand Down

0 comments on commit 7b655e9

Please sign in to comment.