Skip to content

Commit

Permalink
ci: define es service
Browse files Browse the repository at this point in the history
  • Loading branch information
ninoseki committed Apr 7, 2024
1 parent e5c8175 commit 852038b
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,27 @@ on: ["pull_request", "push"]
jobs:
test:
runs-on: ubuntu-latest
services:
es:
image: docker.elastic.co/elasticsearch/elasticsearch:8.13.0
env:
bootstrap.memory_lock: true
discovery.type: single-node
xpack.security.enabled: true
ES_JAVA_OPTS: "-Xms1024m -Xmx1024m"
ELASTIC_PASSWORD": changeme
options: >-
--health-cmd "curl -u elastic:changeme localhost:9200/_cluster/health"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 9200:9200
strategy:
matrix:
python-version: ["3.11"]
poetry-version: ["1.8.2"]
steps:
- name: Configure sysctl 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: Runs Elasticsearch
uses: elastic/elastic-github-actions/elasticsearch@master
with:
stack-version: 8.3.0
elasticsearch_password: changeme
- uses: actions/checkout@v4
- name: Setup poetry
uses: abatilo/actions-poetry@v3
Expand All @@ -34,6 +39,6 @@ jobs:
run: poetry install
- name: Run tests
env:
ES_HOSTS: https://es1:9200
ES_HOSTS: http://locahost:9200
ES_PASSWORD: changeme
run: poetry run pytest

0 comments on commit 852038b

Please sign in to comment.