Skip to content

Commit 721d100

Browse files
authored
Merge pull request #432 from sclorg/support_testing_farm_as_github_action
Support testing farm as GitHub action
2 parents 5c46044 + f7ba29b commit 721d100

File tree

2 files changed

+74
-205
lines changed

2 files changed

+74
-205
lines changed
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Container-tests by GitHub Action at Testing Farm
2+
3+
on:
4+
issue_comment:
5+
types:
6+
- created
7+
jobs:
8+
build:
9+
# This job only runs for '[test]' pull request comments by owner, member
10+
name: Container-tests by GitHub Action on Testing Farm service
11+
runs-on: ubuntu-20.04
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- tmt_plan: "fedora"
17+
os_test: "fedora"
18+
context: "Fedora"
19+
compose: "CentOS-7"
20+
api_key: "TF_PUBLIC_API_KEY"
21+
branch: "main"
22+
tmt_repo: "https://github.com/sclorg/sclorg-testing-farm"
23+
- tmt_plan: "centos7"
24+
os_test: "centos7"
25+
context: "CentOS7"
26+
compose: "CentOS-7"
27+
api_key: "TF_PUBLIC_API_KEY"
28+
branch: "main"
29+
tmt_repo: "https://github.com/sclorg/sclorg-testing-farm"
30+
- tmt_plan: "rhel7-docker"
31+
os_test: "rhel7"
32+
context: "RHEL7"
33+
compose: "RHEL-7.9-Released"
34+
api_key: "TF_INTERNAL_API_KEY"
35+
branch: "master"
36+
tf_scope: "private"
37+
tmt_repo: "https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
38+
- tmt_plan: "rhel8-docker"
39+
os_test: "rhel8"
40+
context: "RHEL8"
41+
compose: "RHEL-8.3.1-Released"
42+
api_key: "TF_INTERNAL_API_KEY"
43+
branch: "master"
44+
tmt_repo: "https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
45+
tf_scope: "private"
46+
- tmt_plan: "c9s"
47+
os_test: "c9s"
48+
context: "CentOS Stream 9"
49+
compose: "CentOS-Stream-9"
50+
api_key: "TF_PUBLIC_API_KEY"
51+
branch: "main"
52+
tmt_repo: "https://github.com/sclorg/sclorg-testing-farm"
53+
if: |
54+
github.event.issue.pull_request
55+
&& (contains(github.event.comment.body, '[test]') || contains(github.event.comment.body, '[test-all]'))
56+
&& contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association)
57+
steps:
58+
- name: Checkout repo
59+
uses: actions/checkout@v2
60+
with:
61+
ref: "refs/pull/${{ github.event.issue.number }}/head"
62+
63+
# https://github.com/sclorg/testing-farm-as-github-action
64+
- name: Schedule tests on external Testing Farm by Testing-Farm-as-github-action
65+
uses: sclorg/testing-farm-as-github-action@v1
66+
with:
67+
api_key: ${{ secrets[matrix.api_key] }}
68+
git_url: ${{ matrix.tmt_repo }}
69+
git_ref: ${{ matrix.branch }}
70+
tf_scope: ${{ matrix.tf_scope }}
71+
tmt_plan_regex: ${{ matrix.tmt_plan }}
72+
pull_request_status_name: ${{ matrix.context }}
73+
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"
74+
compose: ${{ matrix.compose }}

.github/workflows/docker-tests.yml

Lines changed: 0 additions & 205 deletions
This file was deleted.

0 commit comments

Comments
 (0)