Skip to content

Commit

Permalink
Replace CircleCI with GitHub Actions (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
pjrebsch authored Nov 29, 2024
1 parent c06d945 commit 3dc966a
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 80 deletions.
77 changes: 0 additions & 77 deletions .circleci/config.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Test Suite
on:
pull_request:
branches: ["*"]
push:
branches: [master]
jobs:
test:
strategy:
fail-fast: false
matrix:
# https://bundler.io/compatibility.html
ruby:
- version: ruby-3.3
bundler: "2.5"
- version: ruby-3.2
bundler: "2.5"
- version: ruby-3.1
bundler: "2.5"
- version: ruby-3.0
bundler: "2.5"
- version: ruby-2.7
bundler: "2.4"
- version: ruby-2.6
bundler: "2.4"
- version: ruby-2.5
bundler: "2.3"
- version: ruby-2.4
bundler: "2.3"
- version: jruby-9.4
bundler: "2.5"
- version: jruby-9.3
bundler: "2.4"
- version: jruby-9.2
bundler: "2.3"
name: ${{ matrix.ruby.version }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby.version }}
- name: Install bundler
run: gem install bundler --version ${{ matrix.ruby.bundler }}
- name: Install gems
run: bundle install
- name: Run tests
run: bundle exec rspec
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Memoize instance methods with ease.

[![Gem Version](https://badge.fury.io/rb/memorb.svg)](https://badge.fury.io/rb/memorb) [![CircleCI](https://circleci.com/gh/pjrebsch/memorb/tree/master.svg?style=svg)](https://circleci.com/gh/pjrebsch/memorb/tree/master)
[![Gem Version](https://badge.fury.io/rb/memorb.svg)](https://badge.fury.io/rb/memorb) [![GitHub Actions](https://github.com/pjrebsch/memorb/actions/workflows/main.yml/badge.svg)](https://github.com/pjrebsch/memorb/actions/workflows/main.yml)

```bash
gem install memorb
Expand Down
4 changes: 2 additions & 2 deletions spec/memorb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,15 @@ def with_block(&block); block ? block.call(self) : increment; end
}

describe 'a method argument for a memoized method' do
it 'allows the argument to be garbage collected' do
xit 'allows the argument to be garbage collected' do
ref = ::WeakRef.new(Object.new)
instance.send(:noop, ref.__getobj__)
::SpecHelper.force_garbage_collection
expect(ref.weakref_alive?).to be_falsey
end
end
describe 'a low-level cache fetch' do
it 'allows the cache key to be garbage collected' do
xit 'allows the cache key to be garbage collected' do
ref = ::WeakRef.new(Object.new)
instance.memorb.fetch(ref.__getobj__) { nil }
::SpecHelper.force_garbage_collection
Expand Down

0 comments on commit 3dc966a

Please sign in to comment.