Skip to content

Commit 7557aee

Browse files
authored
Merge branch 'main' into bump-meilisearch-v0.28.0
2 parents e677b44 + bdeb59b commit 7557aee

File tree

5 files changed

+50
-5
lines changed

5 files changed

+50
-5
lines changed

.github/workflows/tests.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
name: integration-tests
2222
runs-on: ubuntu-latest
2323
steps:
24-
- uses: actions/checkout@v2
24+
- uses: actions/checkout@v3
2525
- name: Set up Python ${{ matrix.python-version }}
2626
uses: actions/setup-python@v2
2727
with:
@@ -39,7 +39,7 @@ jobs:
3939
name: pylint
4040
runs-on: ubuntu-latest
4141
steps:
42-
- uses: actions/checkout@v2
42+
- uses: actions/checkout@v3
4343
- name: Set up Python 3.7
4444
uses: actions/setup-python@v2
4545
with:
@@ -55,7 +55,7 @@ jobs:
5555
name: mypy
5656
runs-on: ubuntu-latest
5757
steps:
58-
- uses: actions/checkout@v2
58+
- uses: actions/checkout@v3
5959
- name: Set up Python 3.9
6060
uses: actions/setup-python@v2
6161
with:

CONTRIBUTING.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ First of all, thank you for contributing to Meilisearch! The goal of this docume
2828

2929
### Setup <!-- omit in toc -->
3030

31+
You can set up your local environment natively or using `docker`, check out the [`docker-compose.yml`](/docker-compose.yml).
32+
33+
Example of running all the checks with docker:
34+
```bash
35+
docker-compose run --rm package bash -c "pipenv run mypy meilisearch && pipenv run pylint meilisearch && pipenv run pytest tests"
36+
```
37+
38+
To install dependencies:
39+
3140
```bash
3241
pipenv install --dev
3342
```
@@ -40,7 +49,7 @@ Each PR should pass the tests, mypy type checking, and the linter to be accepted
4049
# Tests
4150
curl -L https://install.meilisearch.com | sh # download Meilisearch
4251
./meilisearch --master-key=masterKey --no-analytics # run Meilisearch
43-
pipenv run pytest meilisearch
52+
pipenv run pytest tests
4453
# MyPy
4554
pipenv run mypy meilisearch
4655
# Linter

Dockerfile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM python:3.8.4-buster
2+
3+
COPY Pipfile .
4+
COPY Pipfile.lock .
5+
6+
RUN apt-get update -y
7+
8+
# Install pipenv and compilation dependencies
9+
RUN pip3 install pipenv
10+
RUN pipenv install --dev

docker-compose.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: "3.8"
2+
3+
services:
4+
package:
5+
build: .
6+
tty: true
7+
stdin_open: true
8+
working_dir: /home/package
9+
environment:
10+
- MEILISEARCH_HOST=http://meilisearch:7700
11+
depends_on:
12+
- meilisearch
13+
links:
14+
- meilisearch
15+
volumes:
16+
- ./:/home/package
17+
18+
meilisearch:
19+
image: getmeili/meilisearch:latest
20+
ports:
21+
- "7700"
22+
environment:
23+
- MEILI_MASTER_KEY=masterKey
24+
- MEILI_NO_ANALYTICS=true

tests/common.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
import os
2+
13
MASTER_KEY = 'masterKey'
2-
BASE_URL = 'http://127.0.0.1:7700'
4+
BASE_URL = os.getenv('MEILISEARCH_HOST') if os.getenv('MEILISEARCH_HOST') else 'http://127.0.0.1:7700'
35

46
INDEX_UID = 'indexUID'
57
INDEX_UID2 = 'indexUID2'

0 commit comments

Comments
 (0)