1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-10-18 20:09:08 +02:00
unleash.unleash/.github/workflows/e2e.project-access.yml
sjaanus d0631f0d74
Move e2e tests from frontend to backend .github (#1975)
* Add e2e tests

* Remove cypress key

* Add project tag

* Add cypress to root

* Add cypress working directory and package.json in subfolder

* Remove record flag

* Add contains to url check

* Test segment e2e test

* Remove one of contains

* Test e2e tests

* Fix e2e

* Test new yml

* New yaml

* Test different echo

* Update workflows

* Fix deployment url

* Fix formatting
2022-08-29 12:25:11 +00:00

26 lines
1017 B
YAML

name: e2e:project-access
# https://docs.github.com/en/actions/reference/events-that-trigger-workflows
on: [ deployment_status ]
jobs:
e2e:
# only runs this job on successful deploy
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' && contains(github.event.deployment_status.target_url, 'unleash-monorepo-frontend')
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: Install root dependencies
uses: bahmutov/npm-install@v1
- name: Run Cypress
uses: cypress-io/github-action@v2
with:
working-directory: frontend
env: AUTH_USER=admin,AUTH_PASSWORD=unleash4all
config: baseUrl=${{ github.event.deployment_status.target_url }}
spec: cypress/integration/projects/access/project-access.spec.ts