Skip to content

Commit

Permalink
fix the test result ipd env, test start and end reason
Browse files Browse the repository at this point in the history
  • Loading branch information
goulter committed Jan 15, 2025
1 parent 543e1ac commit 290477c
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .github/scripts/configure-workflow.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,8 @@ function get-input-reason() {
REASON="$INPUT_REASON"
elif [ "$GITHUB_EVENT_NAME" = "pull_request" ]; then
REASON="Triggered from PR"
elif [ "$GITHUB_EVENT_NAME" = "schedule" ]; then
REASON="Scheduled run"
else
REASON="No reason provided"
fi
Expand Down
22 changes: 17 additions & 5 deletions .github/workflows/scheduled-idp-web-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,22 @@ jobs:
with:
gcloud-token: ${{ secrets.TEST_RUNNER_GOOGLE_TOKEN }}

- id: configure
env:
# INPUT_TARGET_IDP_ENV: ${{ github.event.inputs.target-idp-env }}
# INPUT_TARGET_IDP_HOST: ${{ github.event.inputs.target-idp-host }}
INPUT_REASON: ${{ github.event.inputs.reason }}
# INPUT_PYTEST_ARGS: ${{ github.event.inputs.pytest-args }}
# UWCA_CERT: ${{ secrets.UWCA_CERT }}
# UWCA_KEY: ${{ secrets.UWCA_KEY }}
run: |
source ./.github/scripts/configure-workflow.sh
configure-workflow
- name: Notify Teams of Test Run Start
env:
IDP_ENV: ${{ matrix.idp_env }}
INPUT_REASON: ${{ steps.config.outputs.input-reason }}
INPUT_REASON: ${{ steps.configure.outputs.input-reason }}
run: |
curl -H "Content-Type: application/json" \
-d '{
Expand Down Expand Up @@ -115,7 +127,7 @@ jobs:
"type": "FactSet",
"facts": [
{"title": "IdP Web Tests running on ", "value": "'${{ env.IDP_ENV }}'"},
{"title": "Reason for Test Run", "value": "GlenHardcodedReasonStart"}
{"title": "Reason for Test Run", "value": "${{ env.INPUT_REASON }}"}
]
}
]
Expand Down Expand Up @@ -163,8 +175,8 @@ jobs:
env:
TEST_STATUS: ${{ steps.run-tests.outputs.test-status }}
REPORT_URL: ${{ steps.config.outputs.report-url }}
INPUT_REASON: ${{ steps.config.outputs.input-reason }}
IDP_ENV: ${{ env.idp_env }}
INPUT_REASON: ${{ steps.configure.outputs.input-reason }}
IDP_ENV: ${{ matrix.idp_env }}
if: always()
run: |
# Set the message body dynamically based on TEST_STATUS
Expand Down Expand Up @@ -202,7 +214,7 @@ jobs:
"type": "FactSet",
"facts": [
{"title": "IdP Web Tests ran on ", "value": "'${{ env.IDP_ENV }}'"},
{"title": "Reason for Test Run", "value": "GlenHardcodedReason"}
{"title": "Reason for Test Run", "value": "${{ env.INPUT_REASON }}"}
]
}
]
Expand Down

0 comments on commit 290477c

Please sign in to comment.