diff --git a/.github/workflows/behave.api.test.yml b/.github/workflows/behave.api.test.yml index d5d78e1..c6c2975 100644 --- a/.github/workflows/behave.api.test.yml +++ b/.github/workflows/behave.api.test.yml @@ -2,11 +2,12 @@ name: Behave API Test on: push: - branches: [develop] + branches: [develop] # Runs dev-tests pull_request: - types: [closed] - branches: [develop, staging, main] + branches: [main] # Triggers on PRs *into* main (used for staging-tests) workflow_dispatch: + pull_request_target: + types: [closed] # Used for prod-tests (PR merged to main) jobs: dev-tests: @@ -38,7 +39,7 @@ jobs: path: reports/ staging-tests: - if: github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'staging' + if: github.event.pull_request.head.ref == 'staging' && github.event.pull_request.base.ref == 'main' runs-on: ubuntu-latest environment: STAGING diff --git a/test/features/steps/shared_test_steps.py b/test/features/steps/shared_test_steps.py index 32baca1..d9a4ea6 100644 --- a/test/features/steps/shared_test_steps.py +++ b/test/features/steps/shared_test_steps.py @@ -1,6 +1,5 @@ from behave import given, when, then -# Shared test steps for various APIs @then("the response status should be 200") def step_then_status_200(context): assert context.response.status_code == 200, f"Expected 200 but got {context.response.status_code}"