Skip to content

fix(git-actions): add mandatory step to test #18

fix(git-actions): add mandatory step to test

fix(git-actions): add mandatory step to test #18

name: Run Cypress Tests
on:
push:
branches:
- swamu/526-web-testing-automation
# pull_request:
# branches:
# - main
jobs:
cypress:
runs-on: ubuntu-latest
environment: Testing
steps:
- name: Checkout repository
uses: actions/checkout@v3
# - name: Set up Node.js
# uses: actions/setup-node@v3
# with:
# node-version: "20" # Specify your Node.js version
# cache: "npm"
# - name: Install dependencies
# run: npm install && npm run postinstall
#
- name: Create .env file
working-directory: ./Hyperswitch-React-Demo-App
run: |
touch .env
echo STATIC_DIR = ./dist >> .env
echo HYPERSWITCH_PUBLISHABLE_KEY = ${{ vars.HYPERSWITCH_PUBLISHABLE_KEY }} >> .env
echo HYPERSWITCH_SECRET_KEY = ${{ vars.HYPERSWITCH_SECRET_KEY }} >> .env
echo PROFILE_ID = ${{ vars.PROFILE_ID }} >> .env
echo HYPERSWITCH_SERVER_URL = "https://sandbox.hyperswitch.io" >> .env
echo HYPERSWITCH_CLIENT_URL = "http://localhost:9050" >> .env
cat .env
# - name: Build and start local server
# run: npm run re:build && npm start &
# echo "Hyperswitch Web started" && cd Hyperswitch-React-Demo-App && npm start &
# echo "Demo App started started"
# - name: Run Cypress
# uses: cypress-io/github-action@v6
# with:
# working-directory: ./cypress-tests