From c8db8b5c26a7dd4d49b260db055ceef4d481292f Mon Sep 17 00:00:00 2001 From: katspaugh Date: Mon, 20 Nov 2023 09:53:11 +0100 Subject: [PATCH] Chore: run e2e tests conditionally on a comment --- .github/workflows/e2e.yml | 5 ++++- .github/workflows/safe-apps-e2e.yml | 11 ++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index fc2c709f25..07ae52c6c5 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -1,7 +1,8 @@ name: e2e on: - pull_request: + issue_comment: + types: [created] concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -9,6 +10,8 @@ concurrency: jobs: e2e: + if: github.event.issue.pull_request && contains(github.event.comment.body, 'Cypress run') && github.event.comment.author_association == 'COLLABORATOR' || github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER' + runs-on: ubuntu-20.04 name: Cypress Smoke tests strategy: diff --git a/.github/workflows/safe-apps-e2e.yml b/.github/workflows/safe-apps-e2e.yml index 7053c80d4d..3aaf503969 100644 --- a/.github/workflows/safe-apps-e2e.yml +++ b/.github/workflows/safe-apps-e2e.yml @@ -1,7 +1,8 @@ name: Safe Apps e2e on: - pull_request: + issue_comment: + types: [created] workflow_dispatch: concurrency: @@ -10,6 +11,14 @@ concurrency: jobs: e2e: + if: > + github.event_name == 'workflow_dispatch' || + (github.event_name == 'issue_comment' && + github.event.issue.pull_request && + contains(github.event.comment.body, '/run-action') && + (github.event.comment.author_association == 'COLLABORATOR' || + github.event.comment.author_association == 'MEMBER' || + github.event.comment.author_association == 'OWNER')) runs-on: ubuntu-latest name: Cypress Safe Apps tests strategy: