forked from opensearch-project/opensearch-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (56 loc) · 1.83 KB
/
test-unreleased.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Integration with Unreleased OpenSearch
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
entry:
- { opensearch_ref: '1.x' }
- { opensearch_ref: '2.x' }
- { opensearch_ref: '2.0' }
- { opensearch_ref: 'main' }
steps:
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.1
- name: Checkout OpenSearch
uses: actions/checkout@v2
with:
repository: opensearch-project/OpenSearch
ref: ${{ matrix.entry.opensearch_ref }}
path: opensearch
- name: Assemble OpenSearch
run: |
cd opensearch
./gradlew assemble
# This step runs the docker image generated during gradle assemble in OpenSearch. It is tagged as opensearch:test.
# Reference: https://github.com/opensearch-project/OpenSearch/blob/2.0/distribution/docker/build.gradle#L190
- name: Run Docker Image
run: |
docker run -p 9200:9200 -p 9600:9600 -d -e "discovery.type=single-node" -e "bootstrap.memory_lock=true" opensearch:test
sleep 90
- name: Checkout Ruby Client
uses: actions/checkout@v2
- name: Build and test with Rake
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev
ruby -v
rake bundle:clean
rake bundle:install
- name: opensearch-ruby
run: cd opensearch && bundle exec rake test:all
- name: opensearch-transport
run: cd opensearch-transport && bundle exec rake test:all
- name: opensearch-api
run: cd opensearch-api && bundle exec rake test:spec
- name: opensearch-dsl
run: cd opensearch-dsl && bundle exec rake test:all