Skip to content

Commit 733ed7f

Browse files
authored
Merge pull request #417 from sclorg/testing_single_versions_in_ci
Testing single versions in CI
2 parents 5255730 + 4a7d301 commit 733ed7f

3 files changed

Lines changed: 71 additions & 17 deletions

File tree

.github/workflows/container-tests.yml

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
name: Container-tests by GitHub Action at Testing Farm
2-
31
on:
42
issue_comment:
53
types:
64
- created
75
jobs:
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"
@@ -38,7 +38,7 @@ jobs:
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"
@@ -51,6 +51,14 @@ jobs:
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 }}

.github/workflows/openshift-tests.yml

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
name: OpenShift tests by GitHub Action at Testing Farm
2-
31
on:
42
issue_comment:
53
types:
64
- created
75
jobs:
8-
build:
6+
openshift-tests:
97
# This job only runs for '[test-all]' or '[test-openshift] pull request comments by owner, member
10-
name: OpenShift tests by GitHub Action on Testing Farm service
8+
name: "OpenShift tests: ${{ matrix.version }} - ${{ matrix.context }}"
119
runs-on: ubuntu-20.04
1210
strategy:
1311
fail-fast: false
1412
matrix:
13+
version: [ "2.5", "2.7", "3.0"]
14+
os_test: [ "centos7", "rhel7", "rhel8", "rhel9"]
1515
include:
1616
- tmt_plan: "centos7"
1717
os_test: "centos7"
@@ -42,7 +42,7 @@ jobs:
4242
- tmt_plan: "rhel8-openshift-4"
4343
os_test: "rhel8"
4444
context: "RHEL8 - OpenShift 4"
45-
compose: "RHEL-8-Updated"
45+
compose: "RHEL-8.6.0-Nightly"
4646
test_name: "test-openshift-4"
4747
api_key: "TF_INTERNAL_API_KEY"
4848
branch: "master"
@@ -68,16 +68,39 @@ jobs:
6868
with:
6969
ref: "refs/pull/${{ github.event.issue.number }}/head"
7070

71+
- name: Prepare needed variables
72+
shell: bash
73+
id: vars
74+
run: |
75+
dockerfile="Dockerfile.${{ matrix.os_test }}"
76+
if [[ ${{ matrix.os_test }} == "centos7" ]]; then
77+
dockerfile="Dockerfile"
78+
fi
79+
echo "::set-output name=DOCKERFILE_NAME::${dockerfile}"
80+
81+
- name: Check that ${{ matrix.version }}/${{ steps.vars.outputs.DOCKERFILE_NAME }} is present
82+
id: check_dockerfile
83+
uses: andstor/file-existence-action@v1
84+
with:
85+
files: "${{ matrix.version }}/${{ steps.vars.outputs.DOCKERFILE_NAME }}"
86+
87+
- name: Check that .exclude-${{ matrix.os_test }} file is not present
88+
id: check_exclude_file
89+
uses: andstor/file-existence-action@v1
90+
with:
91+
files: "${{ matrix.version }}/.exclude-${{ matrix.os_test }}"
92+
7193
# https://github.com/sclorg/testing-farm-as-github-action
72-
- name: Schedule tests on external Testing Farm by Testing-Farm-as-github-action
94+
- name: Schedule tests for ${{ matrix.version }} - ${{ matrix.context }}
7395
id: github_action
96+
if: ${{ steps.check_exclude_file.outputs.files_exists == 'false' && steps.check_dockerfile.outputs.files_exists == 'true' }}
7497
uses: sclorg/testing-farm-as-github-action@v1
7598
with:
7699
api_key: ${{ secrets[matrix.api_key] }}
77100
git_url: ${{ matrix.tmt_repo }}
78101
git_ref: ${{ matrix.branch }}
79102
tf_scope: ${{ matrix.tf_scope }}
80103
tmt_plan_regex: ${{ matrix.tmt_plan }}
81-
pull_request_status_name: ${{ matrix.context }}
82-
variables: "REPO_URL=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY;REPO_NAME=$GITHUB_REPOSITORY;PR_NUMBER=${{ github.event.issue.number }};OS=${{ matrix.os_test }};TEST_NAME=${{ matrix.test_name }}"
104+
pull_request_status_name: "${{ matrix.context }} - ${{ matrix.version }}"
105+
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=${{ matrix.test_name }}"
83106
compose: ${{ matrix.compose }}

0 commit comments

Comments
 (0)