Skip to content

API

API #1717

Workflow file for this run

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/[email protected]
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/[email protected]
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