mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-31 00:57:37 +00:00
* Bump Weaviate * Bump Weaviate * Bump Weaviate client * Bump Weaviate * Revert client version There is a change in the client API that needs to be addressed before bumping its version
99 lines
3.5 KiB
YAML
99 lines
3.5 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
type-check:
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.7
|
|
- name: Test with mypy
|
|
run: |
|
|
pip install mypy types-Markdown types-requests types-PyYAML
|
|
mypy haystack --ignore-missing-imports
|
|
|
|
build-cache:
|
|
needs: type-check
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.7
|
|
- run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
|
- name: Cache
|
|
id: cache-python-env
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ${{ env.pythonLocation }}
|
|
key: ${{ env.pythonLocation }}-${{ env.date }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}
|
|
- name: Install dependencies
|
|
if: steps.cache-python-env.outputs.cache-hit != 'true'
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install --upgrade --upgrade-strategy eager -r requirements-dev.txt -e .
|
|
pip install --upgrade --upgrade-strategy eager -r requirements.txt -e .
|
|
|
|
prepare-build:
|
|
needs: build-cache
|
|
runs-on: ubuntu-20.04
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- id: set-matrix
|
|
run: |
|
|
echo "::set-output name=matrix::$(cd test && ls -d test_*.py | jq -R . | jq -cs .)"
|
|
outputs:
|
|
matrix: ${{ steps.set-matrix.outputs.matrix }}
|
|
build:
|
|
needs: prepare-build
|
|
runs-on: ubuntu-20.04
|
|
strategy:
|
|
matrix:
|
|
test-path: ${{fromJson(needs.prepare-build.outputs.matrix)}}
|
|
fail-fast: false
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python 3.7
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.7
|
|
- run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
|
- name: Cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ${{ env.pythonLocation }}
|
|
key: ${{ env.pythonLocation }}-${{ env.date }}-${{ hashFiles('setup.py') }}-${{ hashFiles('requirements.txt') }}-${{ hashFiles('requirements-dev.txt') }}
|
|
- name: Run Elasticsearch
|
|
run: docker run -d -p 9200:9200 -e "discovery.type=single-node" -e "ES_JAVA_OPTS=-Xms128m -Xmx128m" elasticsearch:7.9.2
|
|
|
|
- name: Run Milvus
|
|
run: docker run -d -p 19530:19530 -p 19121:19121 milvusdb/milvus:1.1.0-cpu-d050721-5e559c
|
|
|
|
- name: Run Weaviate
|
|
run: docker run -d -p 8080:8080 --name haystack_test_weaviate --env AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED='true' --env PERSISTENCE_DATA_PATH='/var/lib/weaviate' semitechnologies/weaviate:1.7.0
|
|
|
|
- name: Run GraphDB
|
|
run: docker run -d -p 7200:7200 --name haystack_test_graphdb deepset/graphdb-free:9.4.1-adoptopenjdk11
|
|
|
|
- name: Run Apache Tika
|
|
run: docker run -d -p 9998:9998 -e "TIKA_CHILD_JAVA_OPTS=-JXms128m" -e "TIKA_CHILD_JAVA_OPTS=-JXmx128m" apache/tika:1.24.1
|
|
|
|
# - name: Run Ray
|
|
# run: RAY_DISABLE_MEMORY_MONITOR=1 ray start --head
|
|
|
|
- name: Install pdftotext
|
|
run: wget --no-check-certificate https://dl.xpdfreader.com/xpdf-tools-linux-4.03.tar.gz && tar -xvf xpdf-tools-linux-4.03.tar.gz && sudo cp xpdf-tools-linux-4.03/bin64/pdftotext /usr/local/bin
|
|
|
|
- name: Install tesseract
|
|
run: sudo apt-get install tesseract-ocr libtesseract-dev poppler-utils
|
|
|
|
- name: Run tests
|
|
run: cd test && pytest -s ${{ matrix.test-path }}
|