Skip to content

Commit 412b188

Browse files
Merge pull request #1 from elastic/github_actions
GitHub actions
2 parents 43a75aa + d3f3e22 commit 412b188

File tree

4 files changed

+62
-38
lines changed

4 files changed

+62
-38
lines changed

.github/workflows/main.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: main
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
jobs:
10+
test-main:
11+
env:
12+
TEST_ES_SERVER: http://localhost:9250
13+
PORT: 9250
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
ruby: [ '2.6', '2.7', '3.0', '3.1', 'jruby-9.3' ]
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: Increase system limits
22+
run: |
23+
sudo swapoff -a
24+
sudo sysctl -w vm.swappiness=1
25+
sudo sysctl -w fs.file-max=262144
26+
sudo sysctl -w vm.max_map_count=262144
27+
- uses: elastic/elastic-github-actions/elasticsearch@master
28+
with:
29+
stack-version: 8.0.0-SNAPSHOT
30+
- uses: ruby/setup-ruby@v1
31+
with:
32+
ruby-version: ${{ matrix.ruby }}
33+
- name: Build
34+
run: |
35+
sudo apt-get update
36+
bundle install
37+
- name: elasticsearch-dsl
38+
run: bundle exec rake test:all

CONTRIBUTING.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
To work on the code, clone the repository and install the dependencies:
2+
3+
```
4+
git clone https://github.com/elasticsearch/elasticsearch-dsl-ruby.git
5+
cd elasticsearch-dsl/
6+
bundle install
7+
```
8+
9+
Use the Rake tasks to run the test suites:
10+
11+
```
12+
bundle exec rake test:unit
13+
bundle exec rake test:integration
14+
```
15+
16+
To launch a separate Elasticsearch server for integration tests, see instructions in the [Elasticsearch Ruby Client](https://github.com/elastic/elasticsearch-ruby/blob/main/CONTRIBUTING.md).

README.md

Lines changed: 5 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
# Elasticsearch::DSL
22

3-
The `elasticsearch-dsl` library provides a Ruby API for
4-
the [Elasticsearch Query DSL](http://www.elasticsearch.com/guide/en/elasticsearch/reference/current/query-dsl.html).
5-
6-
The library is compatible with Ruby 1.9 or higher and Elasticsearch 1.0 and higher.
3+
The `elasticsearch-dsl` library provides a Ruby API for the [Elasticsearch Query DSL](http://www.elasticsearch.com/guide/en/elasticsearch/reference/current/query-dsl.html).
74

85
## Installation
96

@@ -13,12 +10,12 @@ Install the package from [Rubygems](https://rubygems.org):
1310

1411
To use an unreleased version, either add it to your `Gemfile` for [Bundler](http://gembundler.com):
1512

16-
gem 'elasticsearch-dsl', git: 'git://github.com/elasticsearch/elasticsearch-ruby.git'
13+
gem 'elasticsearch-dsl', git: 'git://github.com/elasticsearch/elasticsearch-dsl-ruby.git'
1714

1815
or install it from a source code checkout:
1916

20-
git clone https://github.com/elasticsearch/elasticsearch-ruby.git
21-
cd elasticsearch-ruby/elasticsearch-dsl
17+
git clone https://github.com/elasticsearch/elasticsearch-dsl-ruby.git
18+
cd elasticsearch-dsl-ruby
2219
bundle install
2320
rake install
2421

@@ -290,24 +287,4 @@ s.to_hash
290287

291288
## Development
292289

293-
To work on the code, clone the repository and install the dependencies:
294-
295-
```
296-
git clone https://github.com/elasticsearch/elasticsearch-ruby.git
297-
cd elasticsearch-ruby/elasticsearch-dsl/
298-
bundle install
299-
```
300-
301-
Use the Rake tasks to run the test suites:
302-
303-
```
304-
bundle exec rake test:unit
305-
bundle exec rake test:integration
306-
```
307-
308-
To launch a separate Elasticsearch server for integration tests,
309-
see instructions in the main [README](../README.md#development).
310-
311-
## License
312-
313-
This software is licensed under the [Apache 2 license](./LICENSE).
290+
See [CONTRIBUTING](https://github.com/elastic/elasticsearch-dsl-ruby/blob/main/CONTRIBUTING.md).

Rakefile

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,26 +26,19 @@ require 'rake/testtask'
2626
require 'rspec/core/rake_task'
2727

2828
namespace :test do
29-
30-
desc "Wait for Elasticsearch to be in a green state"
31-
task :wait_for_green do
32-
sh '../scripts/wait-cluster.sh'
33-
end
34-
3529
RSpec::Core::RakeTask.new(:spec)
3630

3731
Rake::TestTask.new(:unit) do |test|
3832
test.libs << 'lib' << 'test'
39-
test.test_files = FileList["test/unit/**/*_test.rb"]
40-
test.deps = [ :spec ]
33+
test.test_files = FileList['test/unit/**/*_test.rb']
34+
test.deps = [:spec]
4135
test.verbose = false
4236
test.warning = false
4337
end
4438

4539
Rake::TestTask.new(:integration) do |test|
46-
test.deps = [ :wait_for_green ]
4740
test.libs << 'lib' << 'test'
48-
test.test_files = FileList["test/integration/**/*_test.rb"]
41+
test.test_files = FileList['test/integration/**/*_test.rb']
4942
test.verbose = false
5043
test.warning = false
5144
end

0 commit comments

Comments
 (0)