Skip to content

Commit

Permalink
Trim e2e workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
anomiex committed Aug 30, 2023
1 parent fadf7f9 commit 60a416e
Showing 1 changed file with 2 additions and 38 deletions.
40 changes: 2 additions & 38 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: E2E Tests

on:
pull_request:
paths-ignore:
- '**.md'
repository_dispatch:
types: [ 'e2e tests**' ]

Expand Down Expand Up @@ -320,16 +317,8 @@ jobs:
BRANCH=${GITHUB_REF:11}
fi
echo "EVENT_TYPE=e2e run $GITHUB_RUN_ID at $GITHUB_EVENT_NAME on $GITHUB_REPOSITORY" >> "$GITHUB_OUTPUT"
echo "CLIENT_PAYLOAD=$( jq -nrc --arg repository "$REPOSITORY" --arg branch "$BRANCH" --arg pr_title "$PR_TITLE" --arg pr_number "$PR_NUMBER" --arg run_id "$GITHUB_RUN_ID" '{ repository: $repository, branch: $branch, pr_title: $pr_title, pr_number: $pr_number, run_id: $run_id }' )" >> "$GITHUB_OUTPUT"
- name: Trigger test report workflow
uses: peter-evans/repository-dispatch@v2
with:
token: ${{ secrets.E2E_TEST_REPORTS_TOKEN }}
repository: automattic/jetpack-e2e-reports
event-type: ${{ steps.report-context.outputs.event_type }}
client-payload: ${{ steps.report-context.outputs.client_payload }}
echo "EVENT_TYPE=e2e run $GITHUB_RUN_ID at $GITHUB_EVENT_NAME on $GITHUB_REPOSITORY"
echo "CLIENT_PAYLOAD=$( jq -nrc --arg repository "$REPOSITORY" --arg branch "$BRANCH" --arg pr_title "$PR_TITLE" --arg pr_number "$PR_NUMBER" --arg run_id "$GITHUB_RUN_ID" '{ repository: $repository, branch: $branch, pr_title: $pr_title, pr_number: $pr_number, run_id: $run_id }' )"
slack-notification:
name: "Slack notification"
Expand All @@ -356,28 +345,3 @@ jobs:
uses: actions/download-artifact@v3
with:
path: test-output

- name: Decrypt config
env:
CONFIG_KEY: ${{ secrets.E2E_CONFIG_KEY }}
run: ./.github/files/e2e-tests/encryption.sh decrypt

- name: Tag release candidate runs
if: github.event_name == 'repository_dispatch' && github.event.client_payload.ref_type == 'tag'
env:
VERSION: ${{ github.event.client_payload.ref_name }}
run: echo "NOTIFICATION_SUITE=rc-${VERSION}" >> $GITHUB_ENV

- name: "Send notification"
uses: ./projects/github-actions/test-results-to-slack
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
slack_token: ${{ secrets.SLACK_TOKEN }}
slack_channel: ${{ secrets.SLACK_E2E_CHANNEL }}
slack_icon_emoji: ":jetpack:"
suite_name: ${{ env.NOTIFICATION_SUITE }}
playwright_report_path: test-output/**/summary.json
playwright_output_dir: test-output/**/results
rules_configuration_path: .github/files/e2e-tests/notification-rules.json


0 comments on commit 60a416e

Please sign in to comment.