Skip to content

Talha/das 463

Talha/das 463 #31

Workflow file for this run

name: Cypress Tests
on:
pull_request:
types:
- opened
- synchronize
jobs:
cypress:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Get PR number
id: pr_number
run: echo "PR_NUMBER=$(echo $GITHUB_REF | sed -n 's/refs\/pull\/\([0-9]*\)\/merge/\1/p')" >> $GITHUB_ENV
- name: Replace URL and running cypress test
run: |
sed -i 's/baseUrl: .*/baseUrl: "https:\/\/deploy-preview-${{ env.PR_NUMBER }}--zenml-ui-staging.netlify.app",/' cypress.config.ts
- name: Run Cypress tests
run: npx cypress run
continue-on-error: true
- name: Check Cypress exit code
run: |
echo "Cypress Exit Code: $?"