From 9ee8c63310e47be438d44d3ea2ffd36e03871340 Mon Sep 17 00:00:00 2001 From: ebeagusamuel Date: Thu, 27 Jan 2022 11:58:58 +0100 Subject: [PATCH 1/9] Test!!!!!!!!!!!! --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 3fa8e2b..6ae28b4 100644 --- a/README.md +++ b/README.md @@ -56,3 +56,4 @@ Give a ⭐️ if you like this project! This project is [MIT](lic.url) licensed. +#### Test From 8237b42601a0c6dc92d3bb88b6065725c8216d36 Mon Sep 17 00:00:00 2001 From: ebeagusamuel Date: Fri, 4 Feb 2022 00:54:43 +0100 Subject: [PATCH 2/9] test --- .github/workflows/features.yml | 78 ++++++++++++++-------------------- bin/controller.rb | 1 - lib/scrapper.rb | 2 +- 3 files changed, 32 insertions(+), 49 deletions(-) diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml index 97769f2..b7c027a 100644 --- a/.github/workflows/features.yml +++ b/.github/workflows/features.yml @@ -1,51 +1,35 @@ name: Features on: - workflow_dispatch: - 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' - type: string - required: true - cucumber_profile: - description: 'Input Cucumber Profile' - type: string - required: true - worker_count: - description: 'Input Number of Worker' - type: number - required: true - + pull_request: + types: [ + synchronize, # PR was updated + opened, # PR was open + ] + jobs: - features: - name: Run features - runs-on: ubuntu-latest + test: + name: Run test 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}} \ No newline at end of file + - 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: ${{ github.sha }} + wait_interval: 10 + propagate_failure: true + wait_workflow: true + inputs: '{ + "talent_portal_branch": "${{ github.sha }}" + "platform_branch": "master" + "billing_branch": "master" + "job_name_prefix": "talent_portal" + "testbox_profile": "talent_portal" + "cucumber_profile": "jenkins_talent_portal_testbox" + "worker_count": "12" + "kubernetes_namespaces_basename": 'talent-portal' + }' + + \ No newline at end of file diff --git a/bin/controller.rb b/bin/controller.rb index ad44ecc..9671552 100755 --- a/bin/controller.rb +++ b/bin/controller.rb @@ -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 diff --git a/lib/scrapper.rb b/lib/scrapper.rb index 9c5c899..0a3bce1 100644 --- a/lib/scrapper.rb +++ b/lib/scrapper.rb @@ -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 From 8b01ce31bee33cf291b64f091244116608286869 Mon Sep 17 00:00:00 2001 From: ebeagusamuel Date: Fri, 4 Feb 2022 00:57:53 +0100 Subject: [PATCH 3/9] test --- .github/workflows/features.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml index b7c027a..5e98b0b 100644 --- a/.github/workflows/features.yml +++ b/.github/workflows/features.yml @@ -22,14 +22,14 @@ jobs: propagate_failure: true wait_workflow: true inputs: '{ - "talent_portal_branch": "${{ github.sha }}" - "platform_branch": "master" + "talent_portal_branch": "${{ github.sha }}", + "platform_branch": "master", "billing_branch": "master" - "job_name_prefix": "talent_portal" - "testbox_profile": "talent_portal" - "cucumber_profile": "jenkins_talent_portal_testbox" - "worker_count": "12" - "kubernetes_namespaces_basename": 'talent-portal' + "job_name_prefix": "talent_portal", + "testbox_profile": "talent_portal", + "cucumber_profile": "jenkins_talent_portal_testbox", + "worker_count": "12", + "kubernetes_namespaces_basename": "talent-portal" }' \ No newline at end of file From 9a45fe1052e4ea6cd54d73bd705e0a92b5d8461a Mon Sep 17 00:00:00 2001 From: ebeagusamuel Date: Fri, 4 Feb 2022 00:59:11 +0100 Subject: [PATCH 4/9] test --- .github/workflows/features.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml index 5e98b0b..b374781 100644 --- a/.github/workflows/features.yml +++ b/.github/workflows/features.yml @@ -9,6 +9,7 @@ on: jobs: test: name: Run test + runs-on: ubuntu-latest steps: - name: Test Action uses: convictional/trigger-workflow-and-wait@v1.3.0 From dbbf28ecd7611c6d9d5b3a2688dacf1b71c644b0 Mon Sep 17 00:00:00 2001 From: ebeagusamuel Date: Fri, 4 Feb 2022 01:11:18 +0100 Subject: [PATCH 5/9] test --- .github/workflows/features.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml index b374781..246ec0e 100644 --- a/.github/workflows/features.yml +++ b/.github/workflows/features.yml @@ -25,7 +25,7 @@ jobs: inputs: '{ "talent_portal_branch": "${{ github.sha }}", "platform_branch": "master", - "billing_branch": "master" + "billing_branch": "master", "job_name_prefix": "talent_portal", "testbox_profile": "talent_portal", "cucumber_profile": "jenkins_talent_portal_testbox", From 1808ad41458c91b4f73835b76c9f34cd92acd05c Mon Sep 17 00:00:00 2001 From: ebeagusamuel Date: Fri, 4 Feb 2022 01:13:56 +0100 Subject: [PATCH 6/9] test --- .github/workflows/features.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml index 246ec0e..e255bd7 100644 --- a/.github/workflows/features.yml +++ b/.github/workflows/features.yml @@ -18,7 +18,7 @@ jobs: repo: newsweek-clone workflow_file_name: features.yml github_token: ${{ secrets.PAT }} - ref: ${{ github.sha }} + ref: master wait_interval: 10 propagate_failure: true wait_workflow: true From f8d421e6c692f2902f6efd257d0c3c4bd1decc87 Mon Sep 17 00:00:00 2001 From: ebeagusamuel Date: Fri, 4 Feb 2022 01:21:45 +0100 Subject: [PATCH 7/9] test --- .github/workflows/features.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml index e255bd7..99320de 100644 --- a/.github/workflows/features.yml +++ b/.github/workflows/features.yml @@ -23,7 +23,7 @@ jobs: propagate_failure: true wait_workflow: true inputs: '{ - "talent_portal_branch": "${{ github.sha }}", + "talent_portal_branch": "${{ github.ref_name }}", "platform_branch": "master", "billing_branch": "master", "job_name_prefix": "talent_portal", From 1a7e040d791716eba4b4ffbc08e12581b31232e1 Mon Sep 17 00:00:00 2001 From: ebeagusamuel Date: Sat, 5 Feb 2022 13:01:53 +0100 Subject: [PATCH 8/9] Test workflow call --- .github/workflows/features.yml | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml index 99320de..fd2008e 100644 --- a/.github/workflows/features.yml +++ b/.github/workflows/features.yml @@ -1,16 +1,21 @@ name: Features on: - pull_request: - types: [ - synchronize, # PR was updated - opened, # PR was open - ] + workflow_call: + inputs: + name: + type: string + required: true + secrets: + PAT: + required: true jobs: test: name: Run test runs-on: ubuntu-latest steps: + - name: Print out inputs + run: echo ${{inputs.name}} - name: Test Action uses: convictional/trigger-workflow-and-wait@v1.3.0 with: @@ -22,15 +27,6 @@ jobs: wait_interval: 10 propagate_failure: true wait_workflow: true - inputs: '{ - "talent_portal_branch": "${{ github.ref_name }}", - "platform_branch": "master", - "billing_branch": "master", - "job_name_prefix": "talent_portal", - "testbox_profile": "talent_portal", - "cucumber_profile": "jenkins_talent_portal_testbox", - "worker_count": "12", - "kubernetes_namespaces_basename": "talent-portal" - }' + \ No newline at end of file From f97a2f1e3c819a16e29156badd10855ab4f77de5 Mon Sep 17 00:00:00 2001 From: ebeagusamuel Date: Sun, 6 Feb 2022 11:26:01 +0100 Subject: [PATCH 9/9] Test workflow call! --- .github/workflows/features.yml | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/features.yml b/.github/workflows/features.yml index fd2008e..1256b2d 100644 --- a/.github/workflows/features.yml +++ b/.github/workflows/features.yml @@ -16,17 +16,17 @@ jobs: steps: - 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 + # - 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 \ No newline at end of file