Integrate ES into search services, create first search-related tests #469
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run Server Tests | |
on: | |
push: | |
branches: | |
- development | |
- main | |
paths: | |
- "Tekst-API/tekst/**" | |
- "Tekst-API/tests/**" | |
- "Tekst-API/pyproject.toml" | |
- "Tekst-API/poetry.lock" | |
- ".github/workflows/server-tests.yml" | |
pull_request: | |
branches: | |
- development | |
paths: | |
- "Tekst-API/tekst/**" | |
- "Tekst-API/tests/**" | |
- "Tekst-API/pyproject.toml" | |
- "Tekst-API/poetry.lock" | |
- ".github/workflows/server-tests.yml" | |
workflow_dispatch: | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
services: | |
mongo: | |
image: mongo:8 | |
ports: | |
- 27017:27017 | |
es: | |
image: elasticsearch:8.15.3 | |
ports: | |
- 9200:9200 | |
env: | |
discovery.type: single-node | |
xpack.security.enabled: false | |
ES_JAVA_OPTS: "-XX:-AlwaysPreTouch" | |
mailpit: | |
image: axllent/mailpit:v1.21 | |
ports: | |
- 1025:1025 | |
env: | |
MP_SMTP_AUTH_ACCEPT_ANY: true | |
MP_SMTP_AUTH_ALLOW_INSECURE: true | |
defaults: | |
run: | |
working-directory: ./Tekst-API | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
cache: "poetry" | |
cache-dependency-path: "./Tekst-API/poetry.lock" | |
- name: Install dependencies | |
run: poetry install --sync | |
- name: Cancel on setup error | |
if: failure() | |
uses: andymckay/[email protected] | |
- name: Run tests | |
if: always() | |
run: TEKST_DEV_MODE=true TEKST_CUSTOM_ENV_FILE=.env.test TEKST_EMAIL__SMTP_STARTTLS=false poetry run coverage run -m pytest && poetry run coverage lcov | |
- name: Coveralls | |
uses: coverallsapp/github-action@v2 |