From 56692b5a2a5456187676df2ce866f6b5a3949675 Mon Sep 17 00:00:00 2001 From: Franck Nijhof Date: Fri, 7 Jan 2022 15:30:45 +0100 Subject: [PATCH] Fail CI when package init file is missing in component tests (#63589) * Fail CI when package init file is missing in component * Warning -> error * Force bash Co-authored-by: epenet <6771947+epenet@users.noreply.github.com> Co-authored-by: epenet <6771947+epenet@users.noreply.github.com> --- .github/workflows/ci.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index cd2c51b4e31..73c7d5d149e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -734,8 +734,15 @@ jobs: - name: Run pytest (partially) if: needs.changes.outputs.test_full_suite == 'false' && matrix.python-version != '3.8' timeout-minutes: 10 + shell: bash run: | . venv/bin/activate + + if [[ ! -f "tests/components/${{ matrix.group }}/__init__.py" ]]; then + echo "::error:: missing file tests/components/${{ matrix.group }}/__init__.py" + exit 1 + fi + python3 -X dev -m pytest \ -qq \ --timeout=9 \