Skip to content

removing cypress actions #93

removing cypress actions

removing cypress actions #93

Workflow file for this run

name: IRCTC Automation Booking
on:
push:
branches:
- 'main'
pull_request:
workflow_dispatch:
inputs:
USERNAME:
required: true
type: string
description: "Your IRCTC Username"
PASSWORD:
required: true
type: string
description: "Your IRCTC Password"
UPI_ID:
required: true
type: string
description: "Your UPI ID To Make Payment From"
jobs:
IRCTC-Booking:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip' # caching pip dependencies
- run: |
pip install -r irctc-captcha-solver/requirements.txt
python3 irctc-captcha-solver/app.py "" # python3 irctc-captcha-solver/app.py "" is used for models to load before starting tatkal tickets
PASSWORD=$(jq -r '.inputs.PASSWORD' $GITHUB_EVENT_PATH)
USERNAME=$(jq -r '.inputs.USERNAME' $GITHUB_EVENT_PATH)
UPI_ID=$(jq -r '.inputs.UPI_ID' $GITHUB_EVENT_PATH)
echo ::add-mask::$PASSWORD
echo ::add-mask::$USERNAME
echo ::add-mask::$UPI_ID
echo PASSWORD=$PASSWORD >> $GITHUB_ENV
echo USERNAME=$USERNAME >> $GITHUB_ENV
echo UPI_ID=$UPI_ID >> $GITHUB_ENV
# python3 irctc-captcha-solver/app.py "" is used for models to load before starting tatkal tickets
- name: Install Node.js and npm
uses: actions/setup-node@v4
with:
node-version: '20.12.2'
- name: Installing Cypress & Running IRCTC Cypress Automation
run: |
npm install cypress
npx cypress run --record --key a15b31a6-b9ee-4678-b9ac-f45a190851fe --env UPI_ID=${{ inputs.UPI_ID || '' }},USERNAME=${{ inputs.USERNAME || secrets.USERNAME }},PASSWORD=${{ inputs.PASSWORD || secrets.PASSWORD }}
# - name: Running IRCTC Cypress Script
# uses: cypress-io/github-action@v6
# with:
# command: npx cypress run --record --key a15b31a6-b9ee-4678-b9ac-f45a190851fe --env UPI_ID=${{ inputs.UPI_ID || '' }},USERNAME=${{ inputs.USERNAME || secrets.USERNAME }},PASSWORD=${{ inputs.PASSWORD || secrets.PASSWORD }}