Skip to content

github actions

github actions #2

Workflow file for this run

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@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.12
- name: Install dependencies
run: |
pip install --upgrade pip
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