This repository has been archived by the owner on Jan 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
84 lines (71 loc) · 2.55 KB
/
integration-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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: Integration with Unreleased OpenSearch
on:
push:
pull_request:
branches:
- "main"
jobs:
integ-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
opensearch_ref: [ '1.x', '2.x', '2.0', 'main' ]
python-version: [ '3.8' ]
steps:
- name: Checkout OpenSearch
uses: actions/checkout@v3
with:
repository: opensearch-project/opensearch
ref: ${{ matrix.opensearch_ref }}
path: opensearch
- name: Get OpenSearch branch top
id: get-key
working-directory: opensearch
run: echo key=`git log -1 --format='%H'` >> $GITHUB_OUTPUT
- name: Restore cached build
id: cache-restore
uses: actions/cache/restore@v3
with:
path: opensearch/distribution/archives/linux-tar/build/distributions
key: ${{ steps.get-key.outputs.key }}
- name: Assemble OpenSearch
if: steps.cache-restore.outputs.cache-hit != 'true'
working-directory: opensearch
run: ./gradlew :distribution:archives:linux-tar:assemble
- name: Save cached build
if: steps.cache-restore.outputs.cache-hit != 'true'
uses: actions/cache/save@v3
with:
path: opensearch/distribution/archives/linux-tar/build/distributions
key: ${{ steps.get-key.outputs.key }}
- name: Run OpenSearch
working-directory: opensearch/distribution/archives/linux-tar/build/distributions
run: |
tar xf opensearch-min-*
./opensearch-*/bin/opensearch &
for attempt in {1..20}; do sleep 5; if curl -s localhost:9200; then echo '=====> ready'; break; fi; echo '=====> waiting...'; done
- name: Checkout High Level Python Client
uses: actions/checkout@v3
with:
path: dsl-py
- name: Setup Python - ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
env:
PIP_NO_PYTHON_VERSION_WARNING: 1
- name: Install nox
run: |
python -m pip install nox
- name: Run integration tests
working-directory: dsl-py
run: |
nox --no-error-on-missing-interpreter -rs test
- name: Save server logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: opensearch-logs-${{ matrix.opensearch_ref }}-python-${{ matrix.python-version }}
path: |
opensearch/distribution/archives/linux-tar/build/distributions/**/logs/*