Skip to content

Commit e81ac6f

Browse files
committed
Run CI here automatically for every new PR to master branch
1 parent ff7f5d6 commit e81ac6f

File tree

2 files changed

+13
-32
lines changed

2 files changed

+13
-32
lines changed

.github/workflows/container-tests.yml

+6-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
1+
name: Container tests
2+
13
on:
2-
issue_comment:
3-
types:
4-
- created
4+
pull_request:
5+
branches:
6+
- 'master'
57
jobs:
68
distgen-check:
79
name: "Check distgen generated files"
810
runs-on: ubuntu-20.04
9-
if: |
10-
github.event.issue.pull_request
11-
&& (contains(github.event.comment.body, '[test]') || contains(github.event.comment.body, '[test-all]'))
12-
&& contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association)
1311
steps:
1412
- name: Checkout repo
1513
uses: actions/checkout@v2
1614
with:
17-
ref: "refs/pull/${{ github.event.issue.number }}/head"
1815
submodules: true
1916

2017
- name: Check distgen generated files
@@ -50,7 +47,6 @@ jobs:
5047
5148
container-tests:
5249
needs: distgen-check
53-
# This job only runs for '[test]' pull request comments by owner, member
5450
name: "Container tests: ${{ matrix.version }} - ${{ matrix.context }}"
5551
runs-on: ubuntu-20.04
5652
strategy:
@@ -113,15 +109,9 @@ jobs:
113109
branch: "main"
114110
tmt_repo: "https://github.com/sclorg/sclorg-testing-farm"
115111

116-
if: |
117-
github.event.issue.pull_request
118-
&& (contains(github.event.comment.body, '[test]') || contains(github.event.comment.body, '[test-all]'))
119-
&& contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association)
120112
steps:
121113
- name: Checkout repo
122114
uses: actions/checkout@v2
123-
with:
124-
ref: "refs/pull/${{ github.event.issue.number }}/head"
125115

126116
- name: Prepare needed variables
127117
shell: bash
@@ -157,5 +147,5 @@ jobs:
157147
tf_scope: ${{ matrix.tf_scope }}
158148
tmt_plan_regex: ${{ matrix.tmt_plan }}
159149
pull_request_status_name: "${{ matrix.context }} - ${{ matrix.version }}"
160-
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"
150+
variables: "REPO_URL=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY;REPO_NAME=$GITHUB_REPOSITORY;PR_NUMBER=${{ github.event.number }};SINGLE_VERSION=${{ matrix.version }};OS=${{ matrix.os_test }};TEST_NAME=test"
161151
compose: ${{ matrix.compose }}

.github/workflows/openshift-tests.yml

+7-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1+
name: Openshift tests
2+
13
on:
2-
issue_comment:
3-
types:
4-
- created
4+
pull_request:
5+
branches:
6+
- 'master'
7+
58
jobs:
69
distgen-check:
710
name: "Check distgen generated files"
811
runs-on: ubuntu-20.04
9-
if: |
10-
github.event.issue.pull_request
11-
&& (contains(github.event.comment.body, '[test]') || contains(github.event.comment.body, '[test-all]'))
12-
&& contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association)
1312
steps:
1413
- name: Checkout repo
1514
uses: actions/checkout@v2
1615
with:
17-
ref: "refs/pull/${{ github.event.issue.number }}/head"
1816
submodules: true
1917

2018
- name: Check distgen generated files
@@ -28,7 +26,6 @@ jobs:
2826
2927
openshift-tests:
3028
needs: distgen-check
31-
# This job only runs for '[test-all]' or '[test-openshift] pull request comments by owner, member
3229
name: "OpenShift tests: ${{ matrix.version }} - ${{ matrix.context }}"
3330
runs-on: ubuntu-20.04
3431
strategy:
@@ -82,15 +79,9 @@ jobs:
8279
tmt_repo: "https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
8380
tf_scope: "private"
8481

85-
if: |
86-
github.event.issue.pull_request
87-
&& (contains(github.event.comment.body, '[test-openshift]') || contains(github.event.comment.body, '[test-all]'))
88-
&& contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association)
8982
steps:
9083
- name: Checkout repo
9184
uses: actions/checkout@v2
92-
with:
93-
ref: "refs/pull/${{ github.event.issue.number }}/head"
9485

9586
- name: Prepare needed variables
9687
shell: bash
@@ -126,5 +117,5 @@ jobs:
126117
tf_scope: ${{ matrix.tf_scope }}
127118
tmt_plan_regex: ${{ matrix.tmt_plan }}
128119
pull_request_status_name: "${{ matrix.context }} - ${{ matrix.version }}"
129-
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 }}"
120+
variables: "REPO_URL=$GITHUB_SERVER_URL/$GITHUB_REPOSITORY;REPO_NAME=$GITHUB_REPOSITORY;PR_NUMBER=${{ github.event.number }};SINGLE_VERSION=${{ matrix.version }};OS=${{ matrix.os_test }};TEST_NAME=${{ matrix.test_name }}"
130121
compose: ${{ matrix.compose }}

0 commit comments

Comments
 (0)