From e81ac6ff06fc2e311314dba6e47b4bdaec79c3e7 Mon Sep 17 00:00:00 2001 From: Lumir Balhar Date: Tue, 13 Dec 2022 15:47:15 +0100 Subject: [PATCH] Run CI here automatically for every new PR to master branch --- .github/workflows/container-tests.yml | 22 ++++++---------------- .github/workflows/openshift-tests.yml | 23 +++++++---------------- 2 files changed, 13 insertions(+), 32 deletions(-) diff --git a/.github/workflows/container-tests.yml b/.github/workflows/container-tests.yml index 265f8783..69e5069c 100644 --- a/.github/workflows/container-tests.yml +++ b/.github/workflows/container-tests.yml @@ -1,20 +1,17 @@ +name: Container tests + on: - issue_comment: - types: - - created + pull_request: + branches: + - 'master' jobs: distgen-check: name: "Check distgen generated files" runs-on: ubuntu-20.04 - if: | - github.event.issue.pull_request - && (contains(github.event.comment.body, '[test]') || contains(github.event.comment.body, '[test-all]')) - && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) steps: - name: Checkout repo uses: actions/checkout@v2 with: - ref: "refs/pull/${{ github.event.issue.number }}/head" submodules: true - name: Check distgen generated files @@ -50,7 +47,6 @@ jobs: container-tests: needs: distgen-check - # This job only runs for '[test]' pull request comments by owner, member name: "Container tests: ${{ matrix.version }} - ${{ matrix.context }}" runs-on: ubuntu-20.04 strategy: @@ -113,15 +109,9 @@ jobs: 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]')) - && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) steps: - name: Checkout repo uses: actions/checkout@v2 - with: - ref: "refs/pull/${{ github.event.issue.number }}/head" - name: Prepare needed variables shell: bash @@ -157,5 +147,5 @@ jobs: tf_scope: ${{ matrix.tf_scope }} tmt_plan_regex: ${{ matrix.tmt_plan }} 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" + 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" compose: ${{ matrix.compose }} diff --git a/.github/workflows/openshift-tests.yml b/.github/workflows/openshift-tests.yml index f9e93158..9a2a51e8 100644 --- a/.github/workflows/openshift-tests.yml +++ b/.github/workflows/openshift-tests.yml @@ -1,20 +1,18 @@ +name: Openshift tests + on: - issue_comment: - types: - - created + pull_request: + branches: + - 'master' + jobs: distgen-check: name: "Check distgen generated files" runs-on: ubuntu-20.04 - if: | - github.event.issue.pull_request - && (contains(github.event.comment.body, '[test]') || contains(github.event.comment.body, '[test-all]')) - && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) steps: - name: Checkout repo uses: actions/checkout@v2 with: - ref: "refs/pull/${{ github.event.issue.number }}/head" submodules: true - name: Check distgen generated files @@ -28,7 +26,6 @@ jobs: openshift-tests: needs: distgen-check - # This job only runs for '[test-all]' or '[test-openshift] pull request comments by owner, member name: "OpenShift tests: ${{ matrix.version }} - ${{ matrix.context }}" runs-on: ubuntu-20.04 strategy: @@ -82,15 +79,9 @@ jobs: tmt_repo: "https://gitlab.cee.redhat.com/platform-eng-core-services/sclorg-tmt-plans" tf_scope: "private" - if: | - github.event.issue.pull_request - && (contains(github.event.comment.body, '[test-openshift]') || contains(github.event.comment.body, '[test-all]')) - && contains(fromJson('["OWNER", "MEMBER"]'), github.event.comment.author_association) steps: - name: Checkout repo uses: actions/checkout@v2 - with: - ref: "refs/pull/${{ github.event.issue.number }}/head" - name: Prepare needed variables shell: bash @@ -126,5 +117,5 @@ jobs: tf_scope: ${{ matrix.tf_scope }} tmt_plan_regex: ${{ matrix.tmt_plan }} 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 }}" + 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 }}" compose: ${{ matrix.compose }}