From 7349c1d75acd7547a7365de262a416f0e3b354ce Mon Sep 17 00:00:00 2001 From: Alan Christie Date: Thu, 9 Jan 2025 07:13:00 +0000 Subject: [PATCH] test: Fix test (misnamed step) and add dry-run to CI --- .github/workflows/latest-stack-test.yaml | 12 ++++++++++++ behaviour/features/steps/steps_then.py | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/latest-stack-test.yaml b/.github/workflows/latest-stack-test.yaml index 8229a78..f46c763 100644 --- a/.github/workflows/latest-stack-test.yaml +++ b/.github/workflows/latest-stack-test.yaml @@ -23,12 +23,15 @@ jobs: environment: behaviour-stack-alan steps: + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: Checkout uses: actions/checkout@v4 + - name: Install Poetry uses: snok/install-poetry@v1 with: @@ -36,12 +39,21 @@ jobs: virtualenvs-in-project: true virtualenvs-path: .venv installer-parallel: true + - name: Install Dependencies run: poetry install --no-interaction --with dev + - name: Static Analysis run: | source .venv/bin/activate pre-commit run --all-files + + - name: Behaviour Tests (Dry Run) + working-directory: ./behaviour + run: | + source ../.venv/bin/activate + behave --dry-run + - name: Behaviour Tests working-directory: ./behaviour run: | diff --git a/behaviour/features/steps/steps_then.py b/behaviour/features/steps/steps_then.py index 2ab8bf5..88cf614 100644 --- a/behaviour/features/steps/steps_then.py +++ b/behaviour/features/steps/steps_then.py @@ -42,7 +42,7 @@ def step_impl(context, count) -> None: # pylint: disable=function-redefined assert context.response_count == count -@then("the response should be {status_code_name}") # pylint: disable=not-callable +@then("the API response should be {status_code_name}") # pylint: disable=not-callable def step_impl(context, status_code_name) -> None: # pylint: disable=function-redefined """Relies on context members: - - status_code"""