1- name : Container-tests by GitHub Action at Testing Farm
2-
31on :
42 issue_comment :
53 types :
64 - created
75jobs :
8- build :
6+ container-tests :
97 # This job only runs for '[test]' pull request comments by owner, member
10- name : Container-tests by GitHub Action on Testing Farm service
118 runs-on : ubuntu-20.04
9+ name : " Container tests: ${{ matrix.version }} - ${{ matrix.context }}"
1210 strategy :
1311 fail-fast : false
1412 matrix :
13+ version : [ "10", "11", "12", "13" ]
14+ os_test : [ "fedora", "centos7", "rhel7", "rhel8", "rhel9", "c9s", "c8s"]
1515 include :
1616 - tmt_plan : " fedora"
1717 os_test : " fedora"
3333 compose : " RHEL-7.9-Released"
3434 api_key : " TF_INTERNAL_API_KEY"
3535 branch : " master"
36- tf_scope : " private"
3736 tmt_repo : " https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
37+ tf_scope : " private"
3838 - tmt_plan : " rhel8-docker"
3939 os_test : " rhel8"
4040 context : " RHEL8"
5151 branch : " master"
5252 tmt_repo : " https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
5353 tf_scope : " private"
54+ - tmt_plan : " rhel9-unsubscribed-docker"
55+ os_test : " rhel9"
56+ context : " RHEL9 - Unsubscribed host"
57+ compose : " RHEL-9.0.0-Nightly"
58+ api_key : " TF_INTERNAL_API_KEY"
59+ branch : " master"
60+ tmt_repo : " https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
61+ tf_scope : " private"
5462 - tmt_plan : " c9s"
5563 os_test : " c9s"
5664 context : " CentOS Stream 9"
6573 api_key : " TF_PUBLIC_API_KEY"
6674 branch : " main"
6775 tmt_repo : " https://github.com/sclorg/sclorg-testing-farm"
76+
6877 if : |
6978 github.event.issue.pull_request
7079 && (contains(github.event.comment.body, '[test]') || contains(github.event.comment.body, '[test-all]'))
@@ -75,15 +84,39 @@ jobs:
7584 with :
7685 ref : " refs/pull/${{ github.event.issue.number }}/head"
7786
87+ - name : Prepare needed variables
88+ shell : bash
89+ id : vars
90+ run : |
91+ dockerfile="Dockerfile.${{ matrix.os_test }}"
92+ if [[ ${{ matrix.os_test }} == "centos7" ]]; then
93+ dockerfile="Dockerfile"
94+ fi
95+ echo "::set-output name=DOCKERFILE_NAME::${dockerfile}"
96+
97+ - name : Check that ${{ matrix.version }}/${{ steps.vars.outputs.DOCKERFILE_NAME }} is present
98+ id : check_dockerfile
99+ uses : andstor/file-existence-action@v1
100+ with :
101+ files : " ${{ matrix.version }}/${{ steps.vars.outputs.DOCKERFILE_NAME }}"
102+
103+ - name : Check that .exclude-${{ matrix.os_test }} file is not present
104+ id : check_exclude_file
105+ uses : andstor/file-existence-action@v1
106+ with :
107+ files : " ${{ matrix.version }}/.exclude-${{ matrix.os_test }}"
108+
78109 # https://github.com/sclorg/testing-farm-as-github-action
79- - name : Schedule tests on external Testing Farm by Testing-Farm-as-github-action
110+ - name : Schedule tests for ${{ matrix.version }} - ${{ matrix.context }}
111+ id : github_action
112+ if : ${{ steps.check_exclude_file.outputs.files_exists == 'false' && steps.check_dockerfile.outputs.files_exists == 'true' }}
80113 uses : sclorg/testing-farm-as-github-action@v1
81114 with :
82115 api_key : ${{ secrets[matrix.api_key] }}
83116 git_url : ${{ matrix.tmt_repo }}
84117 git_ref : ${{ matrix.branch }}
85118 tf_scope : ${{ matrix.tf_scope }}
86119 tmt_plan_regex : ${{ matrix.tmt_plan }}
87- pull_request_status_name : ${{ matrix.context }}
88- variables : " REPO_URL=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY;REPO_NAME=$GITHUB_REPOSITORY;PR_NUMBER=${{ github.event.issue.number }};OS=${{ matrix.os_test }};TEST_NAME=test"
120+ pull_request_status_name : " ${{ matrix.context }} - ${{ matrix.version }} "
121+ variables : " REPO_URL=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY;REPO_NAME=$GITHUB_REPOSITORY;PR_NUMBER=${{ github.event.issue.number }};SINGLE_VERSION=${{ matrix.version }}; OS=${{ matrix.os_test }};TEST_NAME=test"
89122 compose : ${{ matrix.compose }}
0 commit comments