From 8d7439c6234d12d52fb311f3cda7f3c0d145e0a2 Mon Sep 17 00:00:00 2001 From: Sara Zan Date: Fri, 10 Jun 2022 18:22:16 +0200 Subject: [PATCH] Move autoformat-check.yml into tests.yml (#2635) --- .github/workflows/autoformat-check.yml | 44 -------------------------- .github/workflows/tests.yml | 36 ++++++++++++++++++++- 2 files changed, 35 insertions(+), 45 deletions(-) delete mode 100644 .github/workflows/autoformat-check.yml diff --git a/.github/workflows/autoformat-check.yml b/.github/workflows/autoformat-check.yml deleted file mode 100644 index 534ac5784..000000000 --- a/.github/workflows/autoformat-check.yml +++ /dev/null @@ -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 \ No newline at end of file diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 29b82ba86..1009caa8f 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -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 - \ No newline at end of file + + # 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 \ No newline at end of file