ToolJet/.github/workflows/cypress.yml
Ajith KV 142d54bc50
Fixed failing profile cypress spec (#6245)
* Fix failed profile spec

* Modify data-cy of the dashboard section header

* Fix manage users spec

* Fix user permission spec

* Remove single workspace cypress test cases

* Add indentation changes

* Update self host signup spec

* Update cypress config file

* adding changes to capture downloads

* fix cypress tests for actions

* fecth invitation url from the database

* database test commit

* test commit

* test commit

* test commit

* test commit for pg host

* test commit

* commit for screenshot

* revert test commits

* Update sql task name

* Add changes for actions

* Fix manage groups spec

* Update folder structure

* Fix user permission spec

---------

Co-authored-by: Adish M <adish.madhu@gmail.com>
2023-05-09 19:33:37 +05:30

62 lines
1.7 KiB
YAML

name: Cypress E2E Test
on:
pull_request_target:
types: [labeled, unlabeled, closed]
workflow_dispatch:
env:
PR_NUMBER: ${{ github.event.number }}
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
jobs:
Run-Cypress:
if: ${{ github.event.action == 'labeled' && github.event.label.name == 'run-cypress' }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
- name: Setup node 18.3.0
uses: actions/setup-node@v3
with:
node-version: 18.3.0
- name: Checking the PR URL
run: |
while true; do
curl --silent --fail https://tooljet-pr-${{ env.PR_NUMBER }}.onrender.com && break
sleep 1
done
# - name: Getting cypress secrets
# # use quotes around the secret, as its value
# # is simply inserted as a string into the command
# run: |
# echo '${{ secrets.CYPRESS_SECRETS }}' > cypress.env.json
- name: Cypress integration test
uses: cypress-io/github-action@v5
with:
working-directory: ./cypress-tests
config: "baseUrl=https://tooljet-pr-${{ env.PR_NUMBER }}.onrender.com"
config-file: cypress-run.config.js
env: ${{ secrets.CYPRESS_SECRETS }}
- name: Capturing screenshots
uses: actions/upload-artifact@v3
if: always()
with:
name: screenshots
path: cypress-tests/cypress/screenshots
- name: Capturing downloads
uses: actions/upload-artifact@v3
if: always()
with:
name: screenshots
path: cypress-tests/cypress/downloads