mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-31 09:10:15 +00:00
* Replace yaml check with a dispatch call * split workflow * add branch for testing * access secrets properly * remove testing branch trigger
55 lines
1.9 KiB
YAML
55 lines
1.9 KiB
YAML
name: OpenAPI Schema
|
|
|
|
on:
|
|
workflow_dispatch: # Activate this workflow manually
|
|
pull_request:
|
|
|
|
jobs:
|
|
|
|
run:
|
|
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
|