Skip to content

Commit

Permalink
merging feature/easyocr
Browse files Browse the repository at this point in the history
  • Loading branch information
shivamguys committed Apr 9, 2024
0 parents commit db271ba
Show file tree
Hide file tree
Showing 15 changed files with 2,853 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# These are supported funding model platform
patreon: #shivamguys
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: shivamguys
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
29 changes: 29 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: shivamguys

---

**Describe the bug**
A clear and concise description of what the bug is.

**If you are encountering any error please run this**
```npx cypress run --record --key 967b25a7-e4dd-4b5b-a143-d799131b2d3b --headed```
this would record your run and can be seen here https://cloud.cypress.io/projects/wy3npb/runs
Please paste the link of the recorded run while creating any issues so that we can see whats going on with you.



**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
59 changes: 59 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: IRCTC Booking

on:
# schedule:
# # “At minute 0 and 30 past every hour from 12 through 21.”
# - cron: '0,30 12-21 * * *'
push:
branches:
- 'feature/*'
pull_request:
workflow_dispatch:
inputs:
USERNAME:
required: true
type: string
PASSWORD:
required: true
type: string

jobs:
IRCTC-Booking:
runs-on: ubuntu-latest


steps:
- name: Mask PASSWORD and USERNAME
run: |
PASSWORD=$(jq -r '.inputs.PASSWORD' $GITHUB_EVENT_PATH)
USERNAME=$(jq -r '.inputs.USERNAME' $GITHUB_EVENT_PATH)
echo ::add-mask::$PASSWORD
echo ::add-mask::$USERNAME
echo PASSWORD=$PASSWORD >> $GITHUB_ENV
echo USERNAME=$USERNAME >> $GITHUB_ENV
- 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 --image-base-64 ""
# python3 irctc-captcha-solver/app.py --image-base-64 "" is used for models to load before starting tatkal tickets

- name: Install Node.js and npm
uses: actions/setup-node@v4
with:
node-version: '21.7.1'

- name: Running IRCTC Cypress Script
uses: cypress-io/github-action@v6
# continue-on-error: true
with:
browser: chrome
command: npx cypress run --record --key 967b25a7-e4dd-4b5b-a143-d799131b2d3b --browser chrome --env USERNAME=${{env.USERNAME}},PASSWORD=${{env.PASSWORD}}


6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
node_modules/
cypress.env.json
.idea
cypress/videos/
cypress/screenshots/
irctc-captcha-solver/__pycache__
26 changes: 26 additions & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const { defineConfig } = require("cypress");

module.exports = defineConfig({
projectId: 'wy3npb',

defaultCommandTimeout: 120000,
// video: true,

e2e: {
setupNodeEvents(on, config) {
// implement node event listeners here
on('task', {
log(message) {
// Then to see the log messages in the terminal
// cy.task("log", "my message");
console.log(message + '\n\n');
return null;
},
});
},
chromeWebSecurity: false,
experimentalModifyObstructiveThirdPartyCode: true
},
});


Loading

0 comments on commit db271ba

Please sign in to comment.