Skip to content

Commit

Permalink
Chore: run e2e tests conditionally on a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
katspaugh committed Nov 20, 2023
1 parent 0b7d378 commit c8db8b5
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: e2e

on:
pull_request:
issue_comment:
types: [created]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

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:
Expand Down
11 changes: 10 additions & 1 deletion .github/workflows/safe-apps-e2e.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
name: Safe Apps e2e

on:
pull_request:
issue_comment:
types: [created]
workflow_dispatch:

concurrency:
Expand All @@ -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:
Expand Down

0 comments on commit c8db8b5

Please sign in to comment.