mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-28 17:07:22 +00:00
62 lines
1.6 KiB
YAML
62 lines
1.6 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 }}
|
|
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.head.ref }}
|
|
cancel-in-progress: true
|
|
|
|
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: 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:
|
|
CYPRESS_SECRETS: ${{ 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
|