-
Notifications
You must be signed in to change notification settings - Fork 619
74 lines (70 loc) · 3.26 KB
/
test-api.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
name: API
on:
schedule:
- cron: '0 2 * * *'
env:
GITHUB_ACTIONS: true
jobs:
test-free:
name: Free
env:
ELASTICSEARCH_VERSION: elasticsearch:8.16.0-SNAPSHOT
ELASTICSEARCH_URL: http://localhost:9200
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with: { fetch-depth: 1 }
- uses: actions/setup-go@v2.1.3
with: { go-version: '1.x' }
- run: go version
- name: Increase system limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Launch Elasticsearch
run: |
docker pull --quiet docker.elastic.co/elasticsearch/${{ env.ELASTICSEARCH_VERSION }}
docker pull --quiet appropriate/curl
make cluster-clean cluster-update cluster detach=true version="${{ env.ELASTICSEARCH_VERSION }}"
- name: Download Elasticsearch source
run: |
curl -s ${{ env.ELASTICSEARCH_URL }} | jq -r '.version.build_hash' > elasticsearch_build_hash && cat elasticsearch_build_hash
curl -sSL --retry 3 -o elasticsearch-$(cat elasticsearch_build_hash).zip https://github.com/elastic/elasticsearch/archive/$(cat elasticsearch_build_hash).zip && \
unzip -q -o elasticsearch-$(cat elasticsearch_build_hash).zip '*.properties' '*.json' '*.yml' -d tmp && \
mv tmp/elasticsearch-$(cat elasticsearch_build_hash)* tmp/elasticsearch
- run: ELASTICSEARCH_BUILD_HASH=$(cat elasticsearch_build_hash) make gen-tests
- run: make test-api
test-platinum:
name: Platinum
env:
ELASTICSEARCH_VERSION: elasticsearch:8.16.0-SNAPSHOT
ELASTICSEARCH_URL: https://elastic:elastic@localhost:9200
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with: { fetch-depth: 1 }
- uses: actions/setup-go@v2.1.3
with: { go-version: '1.x' }
- run: go version
- name: Increase system limits
run: |
sudo swapoff -a
sudo sysctl -w vm.swappiness=1
sudo sysctl -w fs.file-max=262144
sudo sysctl -w vm.max_map_count=262144
- name: Launch Elasticsearch
run: |
docker pull --quiet docker.elastic.co/elasticsearch/${{ env.ELASTICSEARCH_VERSION }}
docker pull --quiet appropriate/curl
make cluster-clean cluster-update cluster flavor=platinum detach=true version="${{ env.ELASTICSEARCH_VERSION }}"
- name: Download Elasticsearch source
run: |
curl -sSk ${{ env.ELASTICSEARCH_URL }}
curl -sSk ${{ env.ELASTICSEARCH_URL }} | jq -r '.version.build_hash' > elasticsearch_build_hash && cat elasticsearch_build_hash && \
curl -sSL --retry 3 -o elasticsearch-$(cat elasticsearch_build_hash).zip https://github.com/elastic/elasticsearch/archive/$(cat elasticsearch_build_hash).zip && \
unzip -q -o elasticsearch-$(cat elasticsearch_build_hash).zip '*.properties' '*.json' '*.yml' -d tmp && \
mv tmp/elasticsearch-$(cat elasticsearch_build_hash)* tmp/elasticsearch
- run: ELASTICSEARCH_BUILD_HASH=$(cat elasticsearch_build_hash) make gen-tests
- run: make test-api flavor=xpack