Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 23 additions & 42 deletions .github/workflows/features.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,32 @@
name: Features
on:
workflow_dispatch:
workflow_call:
inputs:
platform_branch:
description: 'Input Platform branch'
required: false
default: 'master'
talent_portal_branch:
description: 'Input Talent Portal branch'
required: false
default: 'master'
billing_branch:
description: 'Input Billing branch'
required: false
default: 'master'
job_name:
description: 'Input Job Name for Testbox'
name:
type: string
required: true
cucumber_profile:
description: 'Input Cucumber Profile'
type: string
required: true
worker_count:
description: 'Input Number of Worker'
type: number
secrets:
PAT:
required: true

jobs:
features:
name: Run features
test:
name: Run test
runs-on: ubuntu-latest
steps:
- name: Set custom ENV
run: |
echo "TESTBOX_BRANCH_PLATFORM=${{ github.event.inputs.platform_branch}}" >> $GITHUB_ENV
echo "TESTBOX_BRANCH_TALENT_PORTAL=${{ github.event.inputs.talent_portal_branch}}" >> $GITHUB_ENV
echo "TESTBOX_BRANCH_BILLING=${{ github.event.inputs.billing_branch}}" >> $GITHUB_ENV
echo "WORKER_COUNT=${{ github.event.inputs.worker_count}}" >> $GITHUB_ENV
echo "JOB_NAME=${{ github.event.inputs.job_name}}" >> $GITHUB_ENV
echo "CUCUMBER_PROFILE=${{ github.event.inputs.cucumber_profile }}" >> $GITHUB_ENV

- name: Print Set ENV
run: |
echo ${{env.TESTBOX_BRANCH_PLATFORM}}
echo ${{env.TESTBOX_BRANCH_TALENT_PORTAL}}
echo ${{env.TESTBOX_BRANCH_BILLING}}
echo ${{env.WORKER_COUNT}}
echo ${{env.JOB_NAME}}
echo ${{env.CUCUMBER_PROFILE}}
- name: Print out inputs
run: echo ${{inputs.name}}
# - name: Test Action
# uses: convictional/trigger-workflow-and-wait@v1.3.0
# with:
# owner: ebeagusamuel
# repo: newsweek-clone
# workflow_file_name: features.yml
# github_token: ${{ secrets.PAT }}
# ref: master
# wait_interval: 10
# propagate_failure: true
# wait_workflow: true



1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,4 @@ Give a ⭐️ if you like this project!

This project is [MIT](lic.url) licensed.

#### Test
1 change: 0 additions & 1 deletion bin/controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
scraped = scrapper_obj.scrape
page = Page.new(scraped)
arr = page.details

# rubocop disable: Layout/LineLength
def display_details(details)
count = 1
Expand Down
2 changes: 1 addition & 1 deletion lib/scrapper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def scrape
scraped_pages = []
page_body = HTTParty.get(url).body
doc = Nokogiri::HTML(page_body)
doc.css('tr.cmc-table-row').each do |node|
doc.css('table.cmc-table tbody tr').each do |node|
scraped_pages << node
end
scraped_pages
Expand Down