Skip to content

Merge pull request #439 from meilisearch/dependabot/pip/pytest-7.4.1 #850

Merge pull request #439 from meilisearch/dependabot/pip/pytest-7.4.1

Merge pull request #439 from meilisearch/dependabot/pip/pytest-7.4.1 #850

Workflow file for this run

name: Tests
on:
pull_request:
push:
# trying and staging branches are for BORS config
branches:
- trying
- staging
- main
jobs:
linter:
name: linter
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pipenv
run: pipx install pipenv
- name: Set up Python 3.10
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pipenv"
- name: Install dependencies
run: pipenv install --dev
- name: Linter with pylint
run: pipenv run pylint scraper
unit_tests:
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
name: unit-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Chromium
run: sudo apt-get update && sudo apt-get install -y chromium-browser chromium-chromedriver
- name: Install pipenv
run: pipx install pipenv
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pipenv"
- name: Install dependencies
run: pipenv install --dev
- name: Run tests
run: pipenv run pytest
integration_tests:
env:
MEILISEARCH_HOST_URL: "http://127.0.0.1:7700"
MEILISEARCH_API_KEY: "masterKey"
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11"]
name: integration-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install pipenv
run: pipx install pipenv
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: "pipenv"
- name: Install dependencies for production only
run: pipenv install
- name: Meilisearch setup with Docker
run: docker run -d -p 7700:7700 getmeili/meilisearch:latest meilisearch --no-analytics --master-key=masterKey
- name: Run the scraper with basic config
run: pipenv run ./docs_scraper $CONFIG_FILE
env:
CONFIG_FILE: "tests/config_files_examples/docs-basics.config.json"
- name: Run the scraper with custom config
run: pipenv run ./docs_scraper $CONFIG_FILE
env:
CONFIG_FILE: "tests/config_files_examples/docs-custom.config.json"
image_build:
name: image-build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: docker build .