Skip to content

Commit cc1e11e

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

File tree

2 files changed

+9
-32
lines changed

2 files changed

+9
-32
lines changed

Diff for: .github/workflows/container-tests.yml

+4-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,15 @@
11
on:
2-
issue_comment:
3-
types:
4-
- created
2+
pull_request:
3+
branches:
4+
- 'master'
55
jobs:
66
distgen-check:
77
name: "Check distgen generated files"
88
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)
139
steps:
1410
- name: Checkout repo
1511
uses: actions/checkout@v2
1612
with:
17-
ref: "refs/pull/${{ github.event.issue.number }}/head"
1813
submodules: true
1914

2015
- name: Check distgen generated files
@@ -50,7 +45,6 @@ jobs:
5045
5146
container-tests:
5247
needs: distgen-check
53-
# This job only runs for '[test]' pull request comments by owner, member
5448
name: "Container tests: ${{ matrix.version }} - ${{ matrix.context }}"
5549
runs-on: ubuntu-20.04
5650
strategy:
@@ -113,15 +107,9 @@ jobs:
113107
branch: "main"
114108
tmt_repo: "https://github.com/sclorg/sclorg-testing-farm"
115109

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)
120110
steps:
121111
- name: Checkout repo
122112
uses: actions/checkout@v2
123-
with:
124-
ref: "refs/pull/${{ github.event.issue.number }}/head"
125113

126114
- name: Prepare needed variables
127115
shell: bash
@@ -157,5 +145,5 @@ jobs:
157145
tf_scope: ${{ matrix.tf_scope }}
158146
tmt_plan_regex: ${{ matrix.tmt_plan }}
159147
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"
148+
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"
161149
compose: ${{ matrix.compose }}

Diff for: .github/workflows/openshift-tests.yml

+5-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
11
on:
2-
issue_comment:
3-
types:
4-
- created
2+
pull_request:
3+
branches:
4+
- 'master'
5+
56
jobs:
67
distgen-check:
78
name: "Check distgen generated files"
89
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)
1310
steps:
1411
- name: Checkout repo
1512
uses: actions/checkout@v2
1613
with:
17-
ref: "refs/pull/${{ github.event.issue.number }}/head"
1814
submodules: true
1915

2016
- name: Check distgen generated files
@@ -28,7 +24,6 @@ jobs:
2824
2925
openshift-tests:
3026
needs: distgen-check
31-
# This job only runs for '[test-all]' or '[test-openshift] pull request comments by owner, member
3227
name: "OpenShift tests: ${{ matrix.version }} - ${{ matrix.context }}"
3328
runs-on: ubuntu-20.04
3429
strategy:
@@ -82,15 +77,9 @@ jobs:
8277
tmt_repo: "https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans"
8378
tf_scope: "private"
8479

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)
8980
steps:
9081
- name: Checkout repo
9182
uses: actions/checkout@v2
92-
with:
93-
ref: "refs/pull/${{ github.event.issue.number }}/head"
9483

9584
- name: Prepare needed variables
9685
shell: bash
@@ -126,5 +115,5 @@ jobs:
126115
tf_scope: ${{ matrix.tf_scope }}
127116
tmt_plan_regex: ${{ matrix.tmt_plan }}
128117
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 }}"
118+
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 }}"
130119
compose: ${{ matrix.compose }}

0 commit comments

Comments
 (0)