2022-08-12 11:54:32 +02:00
|
|
|
name: e2e:project-access
|
|
|
|
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows
|
2022-08-29 14:25:11 +02:00
|
|
|
on: [ deployment_status ]
|
2022-08-12 11:54:32 +02:00
|
|
|
jobs:
|
|
|
|
e2e:
|
|
|
|
# only runs this job on successful deploy
|
2022-08-29 14:25:11 +02:00
|
|
|
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && contains(github.event.deployment_status.target_url, 'unleash-monorepo-frontend')
|
2022-08-12 11:54:32 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Dump GitHub context
|
|
|
|
env:
|
|
|
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
|
|
|
run: |
|
|
|
|
echo "$GITHUB_CONTEXT"
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Run Cypress
|
|
|
|
uses: cypress-io/github-action@v2
|
|
|
|
with:
|
2022-08-29 14:25:11 +02:00
|
|
|
working-directory: frontend
|
2022-08-12 11:54:32 +02:00
|
|
|
env: AUTH_USER=admin,AUTH_PASSWORD=unleash4all
|
|
|
|
config: baseUrl=${{ github.event.deployment_status.target_url }}
|
|
|
|
spec: cypress/integration/projects/access/project-access.spec.ts
|