Move autoformat-check.yml into tests.yml (#2635)

This commit is contained in:
Sara Zan 2022-06-10 18:22:16 +02:00 committed by GitHub
parent e5423b1515
commit 8d7439c623
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 35 additions and 45 deletions

View File

@ -1,44 +0,0 @@
name: Code & Documentation Check
on:
workflow_dispatch: # Activate this workflow manually
workflow_run:
workflows: [Code & Documentation Updates, Tests]
types:
- completed
jobs:
# This CI action mirrors autoformat.yml, with the difference that it
# runs on Haystack's end. If the contributor hasn't run autoformat.yml,
# then this check will fail.
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: ./.github/actions/python_cache/
- name: Install Dependencies
run: |
pip install --upgrade pip
pip install .[all]
pip install rest_api/
pip install ui/
- name: Code and Docs Updates
run: ./.github/utils/code_and_docs.sh
# If there is anything to commit, fail
- name: Check status
run: |
if [[ `git status --porcelain` ]]; then
git status
echo ""
echo "This means that the 'autoformat.yml' action didn't run."
echo "Please enable GitHub Action on your fork to pass this check!"
echo "See https://github.com/deepset-ai/haystack/blob/master/CONTRIBUTING.md#forks for instructions"
exit 1
fi

View File

@ -653,4 +653,38 @@ jobs:
run: |
pytest ${{ env.PYTEST_PARAMS }} -m "integration and not tika and not graphdb" ${{ env.SUITES_EXCLUDED_FROM_WINDOWS }} test/${{ matrix.folder }} --document_store_type=memory,faiss,elasticsearch
# This CI action mirrors autoformat.yml, with the difference that it
# runs on Haystack's end. If the contributor hasn't run autoformat.yml,
# then this check will fail.
bot-check:
runs-on: ubuntu-latest
needs: unit-tests-linux
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: ./.github/actions/python_cache/
- name: Install Dependencies
run: |
pip install --upgrade pip
pip install .[all]
pip install rest_api/
pip install ui/
- name: Code and Docs Updates
run: ./.github/utils/code_and_docs.sh
# If there is anything to commit, fail
- name: Check status
run: |
if [[ `git status --porcelain` ]]; then
git status
echo ""
echo "This means that the 'autoformat.yml' action didn't run."
echo "Please enable GitHub Action on your fork to pass this check!"
echo "See https://github.com/deepset-ai/haystack/blob/master/CONTRIBUTING.md#forks for instructions"
exit 1
fi