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
47 changes: 47 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Tests
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ] # , windows-latest ]
ruby-version: [ "2.6", "2.7", "3.0", "3.1" ]

services:
cratedb:
image: crate/crate:nightly
ports:
- 44200:4200

name: Ruby ${{ matrix.ruby-version }} on OS ${{ matrix.os }}
steps:

- name: Acquire sources
uses: actions/checkout@v3

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
architecture: x64

- name: Caching of Ruby gems
uses: actions/cache@v3
id: cache-gems
with:
path: vendor/bundle
key: gems-os=${{ matrix.os }}-ruby=${{ matrix.ruby-version }}-${{ hashFiles('**/Gemfile.lock') }}

- name: Bundle install
run: |
gem install bundler
bundle config path vendor/bundle
bundle install

- name: Run tests
run: bundle exec rspec
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ _yardoc
coverage
doc/
lib/bundler/man
parts
pkg
rdoc
spec/reports
Expand Down
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

19 changes: 17 additions & 2 deletions DEVELOP.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
# Run tests

Run CrateDB on port 44200.
```shell
docker run --rm -it --publish=44200:4200 crate:5.1.1 \
-Cdiscovery.type=single-node \
-Ccluster.routing.allocation.disk.threshold_enabled=false
```

Install project and invoke test suite.
```shell
bundle install
bundle exec rspec
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was trying to run the tests locally on this branch, but it didn't work:
/Users/user/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0/gems/activesupport-4.1.16/lib/active_support/core_ext/object/duplicable.rb:82:in <class:BigDecimal>: undefined method new for BigDecimal:Class (NoMethodError)

Will this be fixed with #16?

Copy link
Member Author

@amotl amotl Nov 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

undefined method new for BigDecimal:Class (NoMethodError)

Yes, and a few more subsequent errors as well. Now that I've made it pretty far with the patch, I think making it work completely, and successfully, is almost around the corner.

If you like, and if you can spare some minutes, I will be happy about any help on #16. I will rebase the patch upon this one, after it has been integrated. Making CI work again will probably help for this task.

```


# Release Process

Business as usual, but in case you forgot, here it is.
Expand All @@ -6,9 +22,8 @@ Business as usual, but in case you forgot, here it is.
* update `history.txt` to reflect the changes of this release
* Do the traditional trinity of:

```ruby
```shell
gem update --system
gem build gem build activerecord-crate-adapter.gemspec
gem push activerecord-crate-adapter-<version>.gem
```

8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,7 @@ Crate does not support Joins (yet) so joins won't work.

## Tests

Start up the crate server before running the tests

ruby spec/test_server.rb /path/to/crate

Then run tests with

bundle exec rspec spec
See [DEVELOP.md](DEVELOP.md).


## Contributing
Expand Down
82 changes: 0 additions & 82 deletions spec/test_server.rb

This file was deleted.