mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-08 04:56:45 +00:00
* master->main * revert master rename * Revert change to sphinx link and rename master schema
97 lines
3.4 KiB
YAML
97 lines
3.4 KiB
YAML
name: Schemas
|
|
|
|
on:
|
|
workflow_dispatch: # Activate this workflow manually
|
|
pull_request:
|
|
|
|
jobs:
|
|
|
|
openapi:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Python
|
|
uses: ./.github/actions/python_cache/
|
|
|
|
- name: Install Haystack
|
|
run: |
|
|
pip install --upgrade pip
|
|
pip install .[dev]
|
|
pip install -U rest_api/
|
|
|
|
- name: Update OpenAPI specs
|
|
run: python .github/utils/generate_openapi_specs.py
|
|
|
|
- name: Check status
|
|
run: |
|
|
if [[ `git status --porcelain` ]]; then
|
|
git status
|
|
echo "##################################################################################################"
|
|
git diff
|
|
echo "##################################################################################################"
|
|
echo "# "
|
|
echo "# CHECK FAILED! OpenAPI specs were not updated."
|
|
echo "# "
|
|
echo "# Please generate the new OpenAPI specs locally:"
|
|
echo "# "
|
|
echo "# python .github/utils/generate_openapi_specs.py"
|
|
echo "# "
|
|
echo "# You need a FULL INSTALLATION of Haystack for this step to work."
|
|
echo "# "
|
|
echo "# pip install -e .[all]"
|
|
echo "# "
|
|
echo "# If you cannot do that for any reason, please disable the hook, push "
|
|
echo "# and let us know in the PR description."
|
|
echo "# "
|
|
echo "# See https://github.com/deepset-ai/haystack/blob/main/CONTRIBUTING.md for instructions."
|
|
echo "# "
|
|
echo "# If you have further problems, please open an issue: https://github.com/deepset-ai/haystack/issues"
|
|
echo "# "
|
|
echo "###################################################################################################"
|
|
exit 1
|
|
fi
|
|
|
|
pipeline-yaml:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Setup Python
|
|
uses: ./.github/actions/python_cache/
|
|
|
|
- name: Install sndfile
|
|
run: sudo apt update && sudo apt-get install libsndfile1 ffmpeg
|
|
|
|
- name: Install Haystack
|
|
run: |
|
|
pip install --upgrade pip
|
|
pip install -U .[all]
|
|
|
|
- name: Update pipeline YAML schemas
|
|
run: python .github/utils/generate_json_schema.py
|
|
|
|
- name: Check status
|
|
run: |
|
|
if [[ `git status --porcelain` ]]; then
|
|
git status
|
|
echo "##################################################################################################"
|
|
git diff
|
|
echo "##################################################################################################"
|
|
echo "# "
|
|
echo "# CHECK FAILED! The YAML schemas for pipelines were not updated."
|
|
echo "# "
|
|
echo "# Please generate the new schemas locally:"
|
|
echo "# "
|
|
echo "# python .github/utils/generate_json_schema.py"
|
|
echo "# "
|
|
echo "# Or see https://github.com/deepset-ai/haystack/blob/main/CONTRIBUTING.md for help."
|
|
echo "# "
|
|
echo "# If you have further problems, please open an issue: https://github.com/deepset-ai/haystack/issues"
|
|
echo "# "
|
|
echo "##################################################################################################"
|
|
exit 1
|
|
fi
|