Skip to content

Commit f578c64

Browse files
authored
basic test in GH Actions (#41)
1 parent 0cc539f commit f578c64

File tree

1 file changed

+42
-0
lines changed

1 file changed

+42
-0
lines changed

.github/workflows/tests.yml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
jobs:
10+
tests:
11+
runs-on: ubuntu-latest
12+
services:
13+
es:
14+
image: docker.elastic.co/elasticsearch/elasticsearch-oss:7.10.2
15+
ports:
16+
- 9200:9200
17+
options: >-
18+
--env http.port=9200
19+
--env discovery.type=single-node
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Set up Python
26+
uses: actions/setup-python@v5
27+
with:
28+
python-version: 3.12
29+
30+
- name: Install dependencies
31+
run: |
32+
pip install --upgrade pip
33+
pip install -r requirements.txt
34+
35+
- name: Wait for Elasticsearch
36+
run: |
37+
sleep 10
38+
curl -s http://localhost:9200
39+
40+
- name: Run tests
41+
run: python3 es_test_data.py --count=1000 --es_url=http://localhost:9200
42+

0 commit comments

Comments
 (0)