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 : [ "2.5", "2.7", "3.0"]
14+ os_test : [ "fedora", "centos7", "rhel7", "rhel8", "rhel9", "c9s"]
1515 include :
1616 - tmt_plan : " fedora"
1717 os_test : " fedora"
3838 - tmt_plan : " rhel8-docker"
3939 os_test : " rhel8"
4040 context : " RHEL8"
41- compose : " RHEL-8-Updated "
41+ compose : " RHEL-8.6.0-Nightly "
4242 api_key : " TF_INTERNAL_API_KEY"
4343 branch : " master"
4444 tmt_repo : " https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
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"
@@ -69,16 +77,39 @@ jobs:
6977 with :
7078 ref : " refs/pull/${{ github.event.issue.number }}/head"
7179
80+ - name : Prepare needed variables
81+ shell : bash
82+ id : vars
83+ run : |
84+ dockerfile="Dockerfile.${{ matrix.os_test }}"
85+ if [[ ${{ matrix.os_test }} == "centos7" ]]; then
86+ dockerfile="Dockerfile"
87+ fi
88+ echo "::set-output name=DOCKERFILE_NAME::${dockerfile}"
89+
90+ - name : Check that ${{ matrix.version }}/${{ steps.vars.outputs.DOCKERFILE_NAME }} is present
91+ id : check_dockerfile
92+ uses : andstor/file-existence-action@v1
93+ with :
94+ files : " ${{ matrix.version }}/${{ steps.vars.outputs.DOCKERFILE_NAME }}"
95+
96+ - name : Check that .exclude-${{ matrix.os_test }} file is not present
97+ id : check_exclude_file
98+ uses : andstor/file-existence-action@v1
99+ with :
100+ files : " ${{ matrix.version }}/.exclude-${{ matrix.os_test }}"
101+
72102 # https://github.com/sclorg/testing-farm-as-github-action
73- - name : Schedule tests on external Testing Farm by Testing-Farm-as-github-action
103+ - name : Schedule tests for ${{ matrix.version }} - ${{ matrix.context }}
74104 id : github_action
105+ if : ${{ steps.check_exclude_file.outputs.files_exists == 'false' && steps.check_dockerfile.outputs.files_exists == 'true' }}
75106 uses : sclorg/testing-farm-as-github-action@v1
76107 with :
77108 api_key : ${{ secrets[matrix.api_key] }}
78109 git_url : ${{ matrix.tmt_repo }}
79110 git_ref : ${{ matrix.branch }}
80111 tf_scope : ${{ matrix.tf_scope }}
81112 tmt_plan_regex : ${{ matrix.tmt_plan }}
82- pull_request_status_name : ${{ matrix.context }}
83- 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"
113+ pull_request_status_name : " ${{ matrix.context }} - ${{ matrix.version }} "
114+ 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"
84115 compose : ${{ matrix.compose }}
0 commit comments