Skip to content

Commit

Permalink
Improve tooling and CI
Browse files Browse the repository at this point in the history
  • Loading branch information
guille-sage committed Oct 23, 2023
1 parent a49b752 commit b69d706
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 15 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@ jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
ruby: ['2.7', '3.2']

steps:
- uses: actions/checkout@v2
- uses: ruby/[email protected]
- name: Set up Ruby ${{ matrix.ruby }}
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.4
ruby-version: ${{ matrix.ruby }}
bundler: 1
bundler-cache: true
env:
Expand Down
8 changes: 5 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
FROM ruby:2.3-alpine
FROM ruby:3.2-alpine

RUN apk add --no-cache --update bash

COPY Gemfile elastic_search_framework.gemspec .
COPY lib/elastic_search_framework/version.rb ./lib/elastic_search_framework/

RUN apk add --no-cache --update --virtual .gem-builddeps make gcc libc-dev ruby-json \
&& gem install -N oj -v 2.15.0 \
&& gem install -N json -v 2.1.0 \
&& bundle \
&& apk del .gem-builddeps

# Create application directory and set it as the WORKDIR.
Expand Down
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Or install it yourself as:
## Usage


##Global Config
## Global Config

### #namespace
The namespace is used to set the prefix applied to all table and index names.
Expand Down Expand Up @@ -241,26 +241,23 @@ To run the tests locally, we use Docker to provide both a Ruby and JRuby environ
> This builds the Ruby docker image.
```bash
cd script
./setup.sh
./script/setup.sh
```

### Run Tests:

> This executes the test suite.
```bash
cd script
./test.sh
./script/test.sh
```

### Cleanup

> This is used to clean down docker image created in the setup script.
```bash
cd script
./cleanup.sh
./script/cleanup.sh
```

## Development
Expand Down
2 changes: 1 addition & 1 deletion script/docker-compose.yml → docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ services:
depends_on:
- elasticsearch
volumes:
- ../:/elastic_search_framework
- ./:/elastic_search_framework
2 changes: 1 addition & 1 deletion elastic_search_framework.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ 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.11'
spec.add_development_dependency 'bundler'
spec.add_development_dependency 'rake', '~> 10.0'
spec.add_development_dependency 'rspec'
spec.add_development_dependency 'pry'
Expand Down
2 changes: 1 addition & 1 deletion script/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ echo setup starting.....
docker-compose rm

echo build docker image
cd ../ && docker build --rm -t sage/elasticsearch_test_runner .
docker build --rm -t sage/elasticsearch_test_runner .

echo setup complete

0 comments on commit b69d706

Please sign in to comment.