Skip to content

Commit

Permalink
basic test in GH Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver006 committed Nov 23, 2024
1 parent 0cc539f commit ddbd2bc
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on:
push:
branches:
- master
pull_request:

jobs:
tests:
runs-on: ubuntu-latest
services:
es:
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
ports:
- 9200:9200
options: >-
--env http.port=9200
--env discovery.type=single-node
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12

- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
- name: Wait for Elasticsearch
run: |
sleep 10
curl -s http://localhost:9200
- name: Run tests
run: python3 es_test_data.py --count=1000 --es_url=http://localhost:9200

0 comments on commit ddbd2bc

Please sign in to comment.