Skip to content

CI job passed and test script exit 0, but failed by timeout #4

CI job passed and test script exit 0, but failed by timeout

CI job passed and test script exit 0, but failed by timeout #4

Workflow file for this run

on:
issue_comment:
types:
- created
jobs:
container-tests:
runs-on: ubuntu-22.04
name: "Timeout test for testing farm as a github action"
if: |
github.event.issue.pull_request
&& contains(github.event.comment.body, '[test]')
&& contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association)
steps:
- name: Checkout repo
uses: actions/checkout@v4
with:
ref: "refs/pull/${{ github.event.issue.number }}/head"
- name: Run the tests
uses: ./
id: tf_results
with:
api_key: ${{ secrets.TF_PUBLIC_API_KEY }}
git_ref: "main"
tmt_plan_regex: "timeout_plan"
pull_request_status_name: "Timeout test"
update_pull_request_status: "true"
timeout: 10
- name: Check if log contains exceed limit
run: |
curl ${{ steps.tf_results.outputs.test_log_url }} > results.log
ret_val = $(grep 'duration \"10s\" exceeded' results.log)
if [[ $ret_val != 0 ]]; then
exit 1
fi
exit 0