From 65c43887e51d2f31fa35c666a5f8168456649d2c Mon Sep 17 00:00:00 2001 From: David Glick Date: Fri, 31 Mar 2023 08:35:35 -0700 Subject: [PATCH 1/3] trigger CI on pull_request event --- .github/workflows/acceptance.yml | 2 +- .github/workflows/code-analysis.yml | 2 +- .github/workflows/unit.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/acceptance.yml b/.github/workflows/acceptance.yml index 41309bc3b6..af8a14eb14 100644 --- a/.github/workflows/acceptance.yml +++ b/.github/workflows/acceptance.yml @@ -1,5 +1,5 @@ name: Acceptance Tests -on: [push] +on: [push, pull_request] jobs: core: runs-on: ubuntu-latest diff --git a/.github/workflows/code-analysis.yml b/.github/workflows/code-analysis.yml index 66ad61e73b..37f78bb7e9 100644 --- a/.github/workflows/code-analysis.yml +++ b/.github/workflows/code-analysis.yml @@ -1,5 +1,5 @@ name: Code Analysis Check -on: [push] +on: [push, pull_request] jobs: prettier: name: Prettier diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index 36880bd257..d0e490997c 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -1,5 +1,5 @@ name: Unit Tests -on: [push] +on: [push, pull_request] jobs: unit: name: Core Unit Tests From 8e830ad77c28c950962485e477425bac49dcf8f4 Mon Sep 17 00:00:00 2001 From: David Glick Date: Fri, 31 Mar 2023 09:04:13 -0700 Subject: [PATCH 2/3] changelog --- news/4629.internal | 1 + 1 file changed, 1 insertion(+) create mode 100644 news/4629.internal diff --git a/news/4629.internal b/news/4629.internal new file mode 100644 index 0000000000..869b4a6d24 --- /dev/null +++ b/news/4629.internal @@ -0,0 +1 @@ +Trigger CI workflows to run from external pull requests. @davisagli From f6c0f4d472a2f2e187a7a0328df4ac283eac0b2d Mon Sep 17 00:00:00 2001 From: David Glick Date: Fri, 31 Mar 2023 11:35:55 -0700 Subject: [PATCH 3/3] Avoid duplicate builds --- .github/workflows/acceptance.yml | 10 ++++++++++ .github/workflows/code-analysis.yml | 3 +++ .github/workflows/unit.yml | 1 + 3 files changed, 14 insertions(+) diff --git a/.github/workflows/acceptance.yml b/.github/workflows/acceptance.yml index af8a14eb14..cea3058c29 100644 --- a/.github/workflows/acceptance.yml +++ b/.github/workflows/acceptance.yml @@ -2,6 +2,7 @@ name: Acceptance Tests on: [push, pull_request] jobs: core: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name runs-on: ubuntu-latest name: Core Basic timeout-minutes: 45 @@ -56,6 +57,7 @@ jobs: path: cypress/videos coreblocks: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name runs-on: ubuntu-latest name: Core Blocks timeout-minutes: 35 @@ -110,6 +112,7 @@ jobs: path: cypress/videos corevoltoslate: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name runs-on: ubuntu-latest name: Core Volto Slate timeout-minutes: 45 @@ -164,6 +167,7 @@ jobs: path: cypress/videos core5: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name runs-on: ubuntu-latest name: Core Basic - Plone 5 strategy: @@ -217,6 +221,7 @@ jobs: path: cypress/videos coresandbox: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name runs-on: ubuntu-latest name: Coresandbox timeout-minutes: 35 @@ -270,6 +275,7 @@ jobs: path: cypress/videos guillotina: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: Guillotina runs-on: ubuntu-latest timeout-minutes: 35 @@ -325,6 +331,7 @@ jobs: path: cypress/videos multilingual: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: Multilingual runs-on: ubuntu-latest timeout-minutes: 35 @@ -379,6 +386,7 @@ jobs: path: cypress/videos workingcopy: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: Working Copy runs-on: ubuntu-latest timeout-minutes: 35 @@ -458,6 +466,7 @@ jobs: path: cypress/videos generator: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: Project Generator runs-on: ubuntu-latest timeout-minutes: 35 @@ -553,6 +562,7 @@ jobs: working-directory: ${{env.generator-directory}} seamless: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: Seamless Mode runs-on: ubuntu-latest timeout-minutes: 35 diff --git a/.github/workflows/code-analysis.yml b/.github/workflows/code-analysis.yml index 37f78bb7e9..9b4db344de 100644 --- a/.github/workflows/code-analysis.yml +++ b/.github/workflows/code-analysis.yml @@ -2,6 +2,7 @@ name: Code Analysis Check on: [push, pull_request] jobs: prettier: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: Prettier runs-on: ubuntu-latest strategy: @@ -24,6 +25,7 @@ jobs: run: yarn run prettier eslint: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: ESlint runs-on: ubuntu-latest strategy: @@ -46,6 +48,7 @@ jobs: run: yarn run lint i18n: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: i18n runs-on: ubuntu-latest strategy: diff --git a/.github/workflows/unit.yml b/.github/workflows/unit.yml index d0e490997c..97428e6fe3 100644 --- a/.github/workflows/unit.yml +++ b/.github/workflows/unit.yml @@ -2,6 +2,7 @@ name: Unit Tests on: [push, pull_request] jobs: unit: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: Core Unit Tests runs-on: ubuntu-latest strategy: