Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(cypress): Use pull_request_target event to run cypress #11750

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions .github/workflows/superset-e2e.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
name: E2E

on: [push, pull_request]
on: [push, pull_request, pull_request_target]

jobs:
Cypress:
cypress-matrix:
runs-on: ubuntu-18.04
strategy:
fail-fast: true
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
# leaving the Dashboard hanging ...
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
containers: [1, 2, 3]
browser: ["chrome"]
env:
FLASK_ENV: development
Expand All @@ -34,8 +39,14 @@ jobs:
uses: styfle/cancel-workflow-action@0.6.0
with:
access_token: ${{ github.token }}
- name: Checkout code
- name: Checkout code (push)
if: github.event_name == 'push'
uses: actions/checkout@v2
- name: Checkout code (pull_request)
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
uses: actions/checkout@v2
with:
ref: 'refs/pull/${{ github.event.number }}/merge'
- name: Setup Python
uses: actions/setup-python@v2
with:
Expand Down Expand Up @@ -89,3 +100,12 @@ jobs:
with:
name: screenshots
path: ${{ github.workspace }}/superset-frontend/cypress-base/cypress/screenshots
Cypress:
if: ${{ always() }}
name: Cypress (chrome)
runs-on: ubuntu-18.04
needs: cypress-matrix
steps:
- name: Check build matrix status
if: ${{ needs.cypress-matrix.result != 'success' }}
run: exit 1