Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/behave.api.test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion test/features/steps/shared_test_steps.py
Original file line number Diff line number Diff line change
@@ -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}"
Expand Down
Loading