Skip to content

Add Docker support for containerized deployments #94

Add Docker support for containerized deployments

Add Docker support for containerized deployments #94

Workflow file for this run

name: Test and Lint
on:
pull_request:
branches: [ main ]
push:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
services:
meilisearch:
image: getmeili/meilisearch:v1.6
ports:
- 7700:7700
env:
MEILI_MASTER_KEY: test_master_key
MEILI_ENV: development
options: >-
--health-cmd "curl -f http://localhost:7700/health || exit 1"
--health-interval 30s
--health-timeout 10s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
pip install -e .
- name: Format code with black
run: |
black src/
black tests/
- name: Wait for Meilisearch to be ready
run: |
timeout 60 bash -c 'until curl -f http://localhost:7700/health; do sleep 2; done'
- name: Run tests
env:
MEILI_HTTP_ADDR: http://localhost:7700
MEILI_MASTER_KEY: test_master_key
run: |
pytest tests/ -v