Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 41 additions & 8 deletions .github/workflows/container-tests.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Container-tests by GitHub Action at Testing Farm

on:
issue_comment:
types:
- created
jobs:
build:
container-tests:
# This job only runs for '[test]' pull request comments by owner, member
name: Container-tests by GitHub Action on Testing Farm service
runs-on: ubuntu-20.04
name: "Container tests: ${{ matrix.version }} - ${{ matrix.context }}"
strategy:
fail-fast: false
matrix:
version: [ "10", "11", "12", "13" ]
os_test: [ "fedora", "centos7", "rhel7", "rhel8", "rhel9", "c9s", "c8s"]
include:
- tmt_plan: "fedora"
os_test: "fedora"
Expand All @@ -33,8 +33,8 @@ jobs:
compose: "RHEL-7.9-Released"
api_key: "TF_INTERNAL_API_KEY"
branch: "master"
tf_scope: "private"
tmt_repo: "https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
tf_scope: "private"
- tmt_plan: "rhel8-docker"
os_test: "rhel8"
context: "RHEL8"
Expand All @@ -51,6 +51,14 @@ jobs:
branch: "master"
tmt_repo: "https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
tf_scope: "private"
- tmt_plan: "rhel9-unsubscribed-docker"
os_test: "rhel9"
context: "RHEL9 - Unsubscribed host"
compose: "RHEL-9.0.0-Nightly"
api_key: "TF_INTERNAL_API_KEY"
branch: "master"
tmt_repo: "https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
tf_scope: "private"
- tmt_plan: "c9s"
os_test: "c9s"
context: "CentOS Stream 9"
Expand All @@ -65,6 +73,7 @@ jobs:
api_key: "TF_PUBLIC_API_KEY"
branch: "main"
tmt_repo: "https://github.com/sclorg/sclorg-testing-farm"

if: |
github.event.issue.pull_request
&& (contains(github.event.comment.body, '[test]') || contains(github.event.comment.body, '[test-all]'))
Expand All @@ -75,15 +84,39 @@ jobs:
with:
ref: "refs/pull/${{ github.event.issue.number }}/head"

- name: Prepare needed variables
shell: bash
id: vars
run: |
dockerfile="Dockerfile.${{ matrix.os_test }}"
if [[ ${{ matrix.os_test }} == "centos7" ]]; then
dockerfile="Dockerfile"
fi
echo "::set-output name=DOCKERFILE_NAME::${dockerfile}"

- name: Check that ${{ matrix.version }}/${{ steps.vars.outputs.DOCKERFILE_NAME }} is present
id: check_dockerfile
uses: andstor/file-existence-action@v1
with:
files: "${{ matrix.version }}/${{ steps.vars.outputs.DOCKERFILE_NAME }}"

- name: Check that .exclude-${{ matrix.os_test }} file is not present
id: check_exclude_file
uses: andstor/file-existence-action@v1
with:
files: "${{ matrix.version }}/.exclude-${{ matrix.os_test }}"

# https://github.com/sclorg/testing-farm-as-github-action
- name: Schedule tests on external Testing Farm by Testing-Farm-as-github-action
- name: Schedule tests for ${{ matrix.version }} - ${{ matrix.context }}
id: github_action
if: ${{ steps.check_exclude_file.outputs.files_exists == 'false' && steps.check_dockerfile.outputs.files_exists == 'true' }}
uses: sclorg/testing-farm-as-github-action@v1
with:
api_key: ${{ secrets[matrix.api_key] }}
git_url: ${{ matrix.tmt_repo }}
git_ref: ${{ matrix.branch }}
tf_scope: ${{ matrix.tf_scope }}
tmt_plan_regex: ${{ matrix.tmt_plan }}
pull_request_status_name: ${{ matrix.context }}
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"
pull_request_status_name: "${{ matrix.context }} - ${{ matrix.version }}"
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"
compose: ${{ matrix.compose }}
37 changes: 30 additions & 7 deletions .github/workflows/openshift-tests.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: OpenShift tests by GitHub Action at Testing Farm

on:
issue_comment:
types:
- created
jobs:
build:
openshift-tests:
# This job only runs for '[test-all]' or '[test-openshift] pull request comments by owner, member
name: OpenShift tests by GitHub Action on Testing Farm service
name: "OpenShift tests: ${{ matrix.version }} - ${{ matrix.context }}"
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
version: [ "10", "11", "12", "13" ]
os_test: [ "centos7", "rhel7", "rhel8", "rhel9"]
include:
- tmt_plan: "centos7"
os_test: "centos7"
Expand Down Expand Up @@ -68,16 +68,39 @@ jobs:
with:
ref: "refs/pull/${{ github.event.issue.number }}/head"

- name: Prepare needed variables
shell: bash
id: vars
run: |
dockerfile="Dockerfile.${{ matrix.os_test }}"
if [[ ${{ matrix.os_test }} == "centos7" ]]; then
dockerfile="Dockerfile"
fi
echo "::set-output name=DOCKERFILE_NAME::${dockerfile}"

- name: Check that ${{ matrix.version }}/${{ steps.vars.outputs.DOCKERFILE_NAME }} is present
id: check_dockerfile
uses: andstor/file-existence-action@v1
with:
files: "${{ matrix.version }}/${{ steps.vars.outputs.DOCKERFILE_NAME }}"

- name: Check that .exclude-${{ matrix.os_test }} file is not present
id: check_exclude_file
uses: andstor/file-existence-action@v1
with:
files: "${{ matrix.version }}/.exclude-${{ matrix.os_test }}"

# https://github.com/sclorg/testing-farm-as-github-action
- name: Schedule tests on external Testing Farm by Testing-Farm-as-github-action
- name: Schedule tests for ${{ matrix.version }} - ${{ matrix.context }}
id: github_action
if: ${{ steps.check_exclude_file.outputs.files_exists == 'false' && steps.check_dockerfile.outputs.files_exists == 'true' }}
uses: sclorg/testing-farm-as-github-action@v1
with:
api_key: ${{ secrets[matrix.api_key] }}
git_url: ${{ matrix.tmt_repo }}
git_ref: ${{ matrix.branch }}
tf_scope: ${{ matrix.tf_scope }}
tmt_plan_regex: ${{ matrix.tmt_plan }}
pull_request_status_name: ${{ matrix.context }}
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 }}"
pull_request_status_name: "${{ matrix.context }} - ${{ matrix.version }}"
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 }}"
compose: ${{ matrix.compose }}