Skip to content

Commit

Permalink
github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver006 committed Oct 14, 2024
1 parent 25e9ccc commit 4e500a8
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches:
- master
pull_request:

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

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.7

- name: Install dependencies
run: pip install -r requirements.txt

- name: Wait for Elasticsearch
run: |
sleep 30
curl -s http://localhost:9200
- name: Run tests
run: python3 src/index_emails.py --infile=sample.mbox --es-url=http://localhost:9200

0 comments on commit 4e500a8

Please sign in to comment.