Skip to content

robustify UserCreateForm #14510

robustify UserCreateForm

robustify UserCreateForm #14510

Workflow file for this run

name: Cypress Tests
on:
pull_request:
branches:
- develop
- staging
workflow_dispatch:
jobs:
cypress-run:
permissions: write-all
if: github.repository == 'ohcnetwork/care_fe'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
containers: [1]
env:
REACT_CARE_API_URL: https://care-api.do.ohc.network
steps:
- name: Checkout 📥
uses: actions/checkout@v3
- name: Determine PR Origin
id: pr_origin
run: echo "::set-output name=is_forked::$( echo ${{ github.event.pull_request.head.repo.fork }})"
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22.11.0"
- name: Install dependencies 📦
run: npm ci
- name: Build ⚙️
run: npm run build
- name: Cypress run for Non-Forked PRs 🥬
if: steps.pr_origin.outputs.is_forked == 'false'
uses: cypress-io/github-action@v5
with:
env: SKIP_PREFLIGHT_CHECK=true
install: false
start: "npx vite preview --host"
wait-on: "http://localhost:4000"
wait-on-timeout: 300
record: true
parallel: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: --max_old_space_size=4096
COMMIT_INFO_MESSAGE: ${{github.event.pull_request.title}}
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha}}
- name: Cypress run for Forked PRs 🥬
if: steps.pr_origin.outputs.is_forked == 'true'
uses: cypress-io/github-action@v5
with:
env: SKIP_PREFLIGHT_CHECK=true
install: false
start: "npx vite preview --host"
wait-on: "http://localhost:4000"
wait-on-timeout: 300
record: true
parallel: true
env:
CYPRESS_SPLIT_TESTS: "true"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_OPTIONS: --max_old_space_size=4096
COMMIT_INFO_MESSAGE: ${{github.event.pull_request.title}}
COMMIT_INFO_SHA: ${{github.event.pull_request.head.sha}}
SPLIT: ${{ strategy.job-total }}
SPLIT_INDEX: ${{ strategy.job-index }}
- name: Upload cypress screenshots on failure 📸
uses: actions/upload-artifact@v3
if: failure()
with:
name: cypress-screenshots
path: cypress/screenshots
- name: Upload cypress videos 📹
uses: actions/upload-artifact@v3
if: ${{ failure() && steps.pr_origin.outputs.is_forked == 'true' }}
with:
name: cypress-videos
path: cypress/videos