From dcb97165f06b495bccce03552cd8ed5e69486677 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Thu, 14 Jul 2022 11:44:03 +0530 Subject: [PATCH 01/28] added shell: bash --- .../duplicate-openlogin-homepage.yml | 103 ++++++++++++++++++ 1 file changed, 103 insertions(+) create mode 100644 .github/workflows/duplicate-openlogin-homepage.yml diff --git a/.github/workflows/duplicate-openlogin-homepage.yml b/.github/workflows/duplicate-openlogin-homepage.yml new file mode 100644 index 00000000..56f2ef90 --- /dev/null +++ b/.github/workflows/duplicate-openlogin-homepage.yml @@ -0,0 +1,103 @@ +name: Duplicate - OpenLogin - Homepage + +on: + push + # schedule: + # - cron: "*/30 * * * *" + # workflow_dispatch: + +env: + NODE_VERSION: 16 + +jobs: + run-tests: + name: Duplicate - Run OpenLogin - Homepage tests + strategy: + matrix: + env: [prod] + browser: [firefox, chromium] + os: [macos-latest, windows-latest, ubuntu-latest] + include: + - os: macos-latest + browser: chromium + env: cyan + - os: macos-latest + browser: webkit + env: beta + - os: macos-latest + browser: webkit + env: prod + + runs-on: ${{ matrix.os }} + env: + PLATFORM: ${{ matrix.env }} + outputs: + conclusion: ${{ steps.run-tests.conclusion }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - id: setup-node + name: Setup Node.js ${{ env.NODE_VERSION }} + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + cache: yarn + continue-on-error: true + + - id: yarn-install + name: Install Node.js dependencies + if: steps.setup-node.outcome == 'success' + run: yarn install --frozen-lockfile + continue-on-error: true + + - id: yarn-install-deps + name: Install Ubuntu dependencies + if: steps.yarn-install.outcome == 'success' && startsWith(matrix.os, 'ubuntu') + run: yarn run playwright install-deps ${{ matrix.browser }} + continue-on-error: true + + - id: run-tests + name: Run tests + if: steps.yarn-install.outcome == 'success' && steps.yarn-install-deps.outcome != 'failure' + run: yarn run playwright test --config openlogin/homepage/index.config.ts --project ${{ matrix.browser }} + + - id: telegram-alert + name: Alert to telegram channel + if: always() + run: | + if [[ ${{ steps.run-tests.outcome }} != 'success' ]] + then + echo "Test Failed, sending telegram alert" + curl "https://api.telegram.org/bot${{secrets.BOT_API_TOKEN}}/sendMessage?chat_id=${{secrets.CHAT_ID}}&text=Homepage%0ATestresult=Failed%0AOS=${{matrix.os}}%0Abrowser=${{matrix.browser}}%0AEnvironment=${{matrix.env}}%0AJob=${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" + else + echo "Test Passed, no alert!" + fi + shell: bash + continue-on-error: true + + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v3 + with: + name: test-results-on-${{ matrix.browser }}-${{ matrix.os }} + path: test-results/ + if-no-files-found: ignore + + update-status: + name: Update OpenLogin - Homepage status + needs: run-tests + if: (success() || failure()) && (needs.run-tests.outputs.conclusion != 'skipped') + runs-on: ubuntu-latest + steps: + - name: Update status + uses: fjogeleit/http-request-action@master + with: + url: https://api.statuspage.io/v1/pages/${{ secrets.PAGE_ID }}/components/${{ secrets.HOME_PAGE_COMPONENT_ID }} + customHeaders: '{ "Authorization": "OAuth ${{ secrets.STATUS_PAGE_API_KEY }}" }' + method: PATCH + contentType: "application/json" + timeout: 10000 + data: >- + { "component": { "status": "${{ needs.run-tests.result == 'success' && 'operational' || 'major_outage' }}" } } From 3a370ec5067560282048f115016bbd35d866c479 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Thu, 14 Jul 2022 11:52:46 +0530 Subject: [PATCH 02/28] updated all workflows to run telegram on windows --- .../duplicate-openlogin-homepage.yml | 103 ------------------ .../openlogin.existing-v2-user-login.yml | 1 + .github/workflows/openlogin.homepage.yml | 1 + .../openlogin.login-with-discord.yml | 1 + .../openlogin.login-with-facebook-2fa.yml | 1 + .../openlogin.login-with-facebook.yml | 1 + .../workflows/openlogin.login-with-github.yml | 1 + .../workflows/openlogin.login-with-google.yml | 1 + .../openlogin.login-with-passwordless.yml | 1 + .../workflows/openlogin.new-v2-user-login.yml | 1 + .github/workflows/openlogin.setup-2fa.yml | 1 + 11 files changed, 10 insertions(+), 103 deletions(-) delete mode 100644 .github/workflows/duplicate-openlogin-homepage.yml diff --git a/.github/workflows/duplicate-openlogin-homepage.yml b/.github/workflows/duplicate-openlogin-homepage.yml deleted file mode 100644 index 56f2ef90..00000000 --- a/.github/workflows/duplicate-openlogin-homepage.yml +++ /dev/null @@ -1,103 +0,0 @@ -name: Duplicate - OpenLogin - Homepage - -on: - push - # schedule: - # - cron: "*/30 * * * *" - # workflow_dispatch: - -env: - NODE_VERSION: 16 - -jobs: - run-tests: - name: Duplicate - Run OpenLogin - Homepage tests - strategy: - matrix: - env: [prod] - browser: [firefox, chromium] - os: [macos-latest, windows-latest, ubuntu-latest] - include: - - os: macos-latest - browser: chromium - env: cyan - - os: macos-latest - browser: webkit - env: beta - - os: macos-latest - browser: webkit - env: prod - - runs-on: ${{ matrix.os }} - env: - PLATFORM: ${{ matrix.env }} - outputs: - conclusion: ${{ steps.run-tests.conclusion }} - steps: - - name: Checkout - uses: actions/checkout@v3 - - - id: setup-node - name: Setup Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@v3 - with: - node-version: ${{ env.NODE_VERSION }} - cache: yarn - continue-on-error: true - - - id: yarn-install - name: Install Node.js dependencies - if: steps.setup-node.outcome == 'success' - run: yarn install --frozen-lockfile - continue-on-error: true - - - id: yarn-install-deps - name: Install Ubuntu dependencies - if: steps.yarn-install.outcome == 'success' && startsWith(matrix.os, 'ubuntu') - run: yarn run playwright install-deps ${{ matrix.browser }} - continue-on-error: true - - - id: run-tests - name: Run tests - if: steps.yarn-install.outcome == 'success' && steps.yarn-install-deps.outcome != 'failure' - run: yarn run playwright test --config openlogin/homepage/index.config.ts --project ${{ matrix.browser }} - - - id: telegram-alert - name: Alert to telegram channel - if: always() - run: | - if [[ ${{ steps.run-tests.outcome }} != 'success' ]] - then - echo "Test Failed, sending telegram alert" - curl "https://api.telegram.org/bot${{secrets.BOT_API_TOKEN}}/sendMessage?chat_id=${{secrets.CHAT_ID}}&text=Homepage%0ATestresult=Failed%0AOS=${{matrix.os}}%0Abrowser=${{matrix.browser}}%0AEnvironment=${{matrix.env}}%0AJob=${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" - else - echo "Test Passed, no alert!" - fi - shell: bash - continue-on-error: true - - - - name: Upload test results - if: always() - uses: actions/upload-artifact@v3 - with: - name: test-results-on-${{ matrix.browser }}-${{ matrix.os }} - path: test-results/ - if-no-files-found: ignore - - update-status: - name: Update OpenLogin - Homepage status - needs: run-tests - if: (success() || failure()) && (needs.run-tests.outputs.conclusion != 'skipped') - runs-on: ubuntu-latest - steps: - - name: Update status - uses: fjogeleit/http-request-action@master - with: - url: https://api.statuspage.io/v1/pages/${{ secrets.PAGE_ID }}/components/${{ secrets.HOME_PAGE_COMPONENT_ID }} - customHeaders: '{ "Authorization": "OAuth ${{ secrets.STATUS_PAGE_API_KEY }}" }' - method: PATCH - contentType: "application/json" - timeout: 10000 - data: >- - { "component": { "status": "${{ needs.run-tests.result == 'success' && 'operational' || 'major_outage' }}" } } diff --git a/.github/workflows/openlogin.existing-v2-user-login.yml b/.github/workflows/openlogin.existing-v2-user-login.yml index fcb0a445..5f3b7d16 100644 --- a/.github/workflows/openlogin.existing-v2-user-login.yml +++ b/.github/workflows/openlogin.existing-v2-user-login.yml @@ -93,6 +93,7 @@ jobs: else echo "Test Passed, no alert!" fi + shell: bash continue-on-error: true - id: upload-state diff --git a/.github/workflows/openlogin.homepage.yml b/.github/workflows/openlogin.homepage.yml index da90f088..f076c5e6 100644 --- a/.github/workflows/openlogin.homepage.yml +++ b/.github/workflows/openlogin.homepage.yml @@ -72,6 +72,7 @@ jobs: else echo "Test Passed, no alert!" fi + shell: bash continue-on-error: true - name: Upload test results diff --git a/.github/workflows/openlogin.login-with-discord.yml b/.github/workflows/openlogin.login-with-discord.yml index a5d82c56..4d615505 100644 --- a/.github/workflows/openlogin.login-with-discord.yml +++ b/.github/workflows/openlogin.login-with-discord.yml @@ -94,6 +94,7 @@ jobs: else echo "Test Passed, no alert!" fi + shell: bash continue-on-error: true - name: Upload test results diff --git a/.github/workflows/openlogin.login-with-facebook-2fa.yml b/.github/workflows/openlogin.login-with-facebook-2fa.yml index bb9d76a9..7c963fd6 100644 --- a/.github/workflows/openlogin.login-with-facebook-2fa.yml +++ b/.github/workflows/openlogin.login-with-facebook-2fa.yml @@ -87,6 +87,7 @@ jobs: else echo "Test Passed, no alert!" fi + shell: bash continue-on-error: true - name: Upload test results diff --git a/.github/workflows/openlogin.login-with-facebook.yml b/.github/workflows/openlogin.login-with-facebook.yml index 69e49ab6..724ba921 100644 --- a/.github/workflows/openlogin.login-with-facebook.yml +++ b/.github/workflows/openlogin.login-with-facebook.yml @@ -82,6 +82,7 @@ jobs: else echo "Test Passed, no alert!" fi + shell: bash continue-on-error: true - name: Upload test results diff --git a/.github/workflows/openlogin.login-with-github.yml b/.github/workflows/openlogin.login-with-github.yml index 118800ba..d2b4fb81 100644 --- a/.github/workflows/openlogin.login-with-github.yml +++ b/.github/workflows/openlogin.login-with-github.yml @@ -94,6 +94,7 @@ jobs: else echo "Test Passed, no alert!" fi + shell: bash continue-on-error: true - id: upload-state diff --git a/.github/workflows/openlogin.login-with-google.yml b/.github/workflows/openlogin.login-with-google.yml index 0fb92164..f4bb90a4 100644 --- a/.github/workflows/openlogin.login-with-google.yml +++ b/.github/workflows/openlogin.login-with-google.yml @@ -94,6 +94,7 @@ jobs: else echo "Test Passed, no alert!" fi + shell: bash continue-on-error: true - id: upload-state diff --git a/.github/workflows/openlogin.login-with-passwordless.yml b/.github/workflows/openlogin.login-with-passwordless.yml index 13b9176e..62b55315 100644 --- a/.github/workflows/openlogin.login-with-passwordless.yml +++ b/.github/workflows/openlogin.login-with-passwordless.yml @@ -94,6 +94,7 @@ jobs: else echo "Test Passed, no alert!" fi + shell: bash continue-on-error: true - id: upload-state diff --git a/.github/workflows/openlogin.new-v2-user-login.yml b/.github/workflows/openlogin.new-v2-user-login.yml index 36900d0f..f613feb8 100644 --- a/.github/workflows/openlogin.new-v2-user-login.yml +++ b/.github/workflows/openlogin.new-v2-user-login.yml @@ -90,6 +90,7 @@ jobs: else echo "Test Passed, no alert!" fi + shell: bash continue-on-error: true - id: upload-state diff --git a/.github/workflows/openlogin.setup-2fa.yml b/.github/workflows/openlogin.setup-2fa.yml index 2c819674..7ba9a8b0 100644 --- a/.github/workflows/openlogin.setup-2fa.yml +++ b/.github/workflows/openlogin.setup-2fa.yml @@ -92,6 +92,7 @@ jobs: else echo "Test Passed, no alert!" fi + shell: bash continue-on-error: true - id: upload-state From acc72e94ef41450281e8bdf45ff8b7769e288bf3 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Thu, 14 Jul 2022 13:27:18 +0530 Subject: [PATCH 03/28] test --- .../workflows/duplicate-openlogin.google.yml | 137 ++++++++++++++++++ 1 file changed, 137 insertions(+) create mode 100644 .github/workflows/duplicate-openlogin.google.yml diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml new file mode 100644 index 00000000..61f9415d --- /dev/null +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -0,0 +1,137 @@ +name: Duplicate - OpenLogin - Google Login + +on: + push + # schedule: + # - cron: "*/30 * * * *" + # workflow_dispatch: + +env: + NODE_VERSION: 16 + LOCAL_PATH: openlogin/login-with-google + +jobs: + run-tests: + name: Duplicate - Run OpenLogin - Google Login tests + strategy: + matrix: + env: [prod] + browser: [firefox, chromium] + os: [macos-latest, windows-latest, ubuntu-latest] + include: + - os: macos-latest + browser: chromium + env: cyan + - os: macos-latest + browser: webkit + env: beta + - os: macos-latest + browser: webkit + env: prod + + runs-on: ${{ matrix.os }} + env: + PLATFORM: ${{ matrix.env }} + outputs: + conclusion: ${{ steps.run-tests.conclusion }} + steps: + - name: Checkout + uses: actions/checkout@v3 + + - id: setup-node + name: Setup Node.js ${{ env.NODE_VERSION }} + uses: actions/setup-node@v3 + with: + node-version: ${{ env.NODE_VERSION }} + cache: yarn + continue-on-error: true + + - id: yarn-install + name: Install Node.js dependencies + if: steps.setup-node.outcome == 'success' + run: yarn install --frozen-lockfile + continue-on-error: true + + - id: yarn-install-deps + name: Install Ubuntu dependencies + if: steps.yarn-install.outcome == 'success' && startsWith(matrix.os, 'ubuntu') + run: yarn run playwright install-deps ${{ matrix.browser }} + continue-on-error: true + + - id: configure-aws + name: Configure AWS credentials + if: steps.yarn-install.outcome == 'success' && steps.yarn-install-deps.outcome != 'failure' + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-east-1 + continue-on-error: true + + - name: Set Path + run: | + echo "S3_PATH=${{ env.LOCAL_PATH }}-${{ matrix.env }}" >> $GITHUB_ENV + shell: bash + + - id: download-state + name: Download remote browser snapshots + if: steps.configure-aws.outcome == 'success' + run: aws s3 cp s3://torus-e2e-tests/${{ env.S3_PATH }}/ ${{ env.LOCAL_PATH }}/ --recursive + continue-on-error: true + + - id: run-tests + name: Run tests + if: steps.download-state.outcome == 'success' + run: yarn run playwright test --config ${{ env.LOCAL_PATH }}/index.config.ts --project ${{ matrix.browser }} + + # - id: telegram-alert + # name: Alert to telegram channel + # if: always() + # run: | + # if [[ ${{ steps.run-tests.outcome }} != 'success' ]] + # then + # echo "Test Failed, sending telegram alert" + # curl "https://api.telegram.org/bot${{secrets.BOT_API_TOKEN}}/sendMessage?chat_id=${{secrets.CHAT_ID}}&text=LoginWithGoogle%0ATestresult=Failed%0AOS=${{matrix.os}}%0Abrowser=${{matrix.browser}}%0AEnvironment=${{matrix.env}}%0AJob=${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" + # else + # echo "Test Passed, no alert!" + # fi + # shell: bash + # continue-on-error: true + + - id: upload-state + name: Upload logged-in state once a week + uses: ./.github/actions/upload-state/ + with: + os: ${{ matrix.os }} + browser: ${{ matrix.browser }} + s3_path: ${{ env.S3_PATH }} + local_path: ${{ env.LOCAL_PATH }} + aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws_region: us-east-1 + continue-on-error: true + + - name: Upload test results + if: always() + uses: actions/upload-artifact@v3 + with: + name: test-results-on-${{ matrix.browser }}-${{ matrix.os }} + path: test-results/ + if-no-files-found: ignore + + # update-status: + # name: Update OpenLogin - Google Login status + # needs: run-tests + # if: (success() || failure()) && (needs.run-tests.outputs.conclusion != 'skipped') + # runs-on: ubuntu-latest + # steps: + # - name: Update status + # uses: fjogeleit/http-request-action@master + # with: + # url: https://api.statuspage.io/v1/pages/${{ secrets.PAGE_ID }}/components/${{ secrets.GOOGLE_COMPONENT_ID }} + # customHeaders: '{ "Authorization": "OAuth ${{ secrets.STATUS_PAGE_API_KEY }}" }' + # method: PATCH + # contentType: "application/json" + # timeout: 10000 + # data: >- + # { "component": { "status": "${{ needs.run-tests.result == 'success' && 'operational' || 'major_outage' }}" } } From 700306119f52df23dd1035e5ba25bbc417a474ba Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Thu, 14 Jul 2022 15:50:10 +0530 Subject: [PATCH 04/28] test existing v2 user login --- .../workflows/duplicate-openlogin.google.yml | 28 ++++--------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 61f9415d..39efb62e 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -1,4 +1,4 @@ -name: Duplicate - OpenLogin - Google Login +name: Duplicate - Existing V2 User Login on: push @@ -8,11 +8,11 @@ on: env: NODE_VERSION: 16 - LOCAL_PATH: openlogin/login-with-google + LOCAL_PATH: Duplicate - openlogin/existing-v2-user-login jobs: run-tests: - name: Duplicate - Run OpenLogin - Google Login tests + name: Run OpenLogin - Existing V2 User Login tests strategy: matrix: env: [prod] @@ -32,8 +32,7 @@ jobs: runs-on: ${{ matrix.os }} env: PLATFORM: ${{ matrix.env }} - outputs: - conclusion: ${{ steps.run-tests.conclusion }} + steps: - name: Checkout uses: actions/checkout@v3 @@ -91,7 +90,7 @@ jobs: # if [[ ${{ steps.run-tests.outcome }} != 'success' ]] # then # echo "Test Failed, sending telegram alert" - # curl "https://api.telegram.org/bot${{secrets.BOT_API_TOKEN}}/sendMessage?chat_id=${{secrets.CHAT_ID}}&text=LoginWithGoogle%0ATestresult=Failed%0AOS=${{matrix.os}}%0Abrowser=${{matrix.browser}}%0AEnvironment=${{matrix.env}}%0AJob=${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" + # curl "https://api.telegram.org/bot${{secrets.BOT_API_TOKEN}}/sendMessage?chat_id=${{secrets.CHAT_ID}}&text=Existingv2UserLogin%0ATestresult=Failed%0AOS=${{matrix.os}}%0Abrowser=${{matrix.browser}}%0AEnvironment=${{matrix.env}}%0AJob=${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" # else # echo "Test Passed, no alert!" # fi @@ -118,20 +117,3 @@ jobs: name: test-results-on-${{ matrix.browser }}-${{ matrix.os }} path: test-results/ if-no-files-found: ignore - - # update-status: - # name: Update OpenLogin - Google Login status - # needs: run-tests - # if: (success() || failure()) && (needs.run-tests.outputs.conclusion != 'skipped') - # runs-on: ubuntu-latest - # steps: - # - name: Update status - # uses: fjogeleit/http-request-action@master - # with: - # url: https://api.statuspage.io/v1/pages/${{ secrets.PAGE_ID }}/components/${{ secrets.GOOGLE_COMPONENT_ID }} - # customHeaders: '{ "Authorization": "OAuth ${{ secrets.STATUS_PAGE_API_KEY }}" }' - # method: PATCH - # contentType: "application/json" - # timeout: 10000 - # data: >- - # { "component": { "status": "${{ needs.run-tests.result == 'success' && 'operational' || 'major_outage' }}" } } From fde0585fbea0dfde3660e6cd0fa8b817d39d7c43 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Thu, 14 Jul 2022 15:57:22 +0530 Subject: [PATCH 05/28] test existing v2 user login --- .github/workflows/duplicate-openlogin.google.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 39efb62e..b071e5de 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -8,11 +8,11 @@ on: env: NODE_VERSION: 16 - LOCAL_PATH: Duplicate - openlogin/existing-v2-user-login + LOCAL_PATH: openlogin/existing-v2-user-login jobs: run-tests: - name: Run OpenLogin - Existing V2 User Login tests + name: Duplicate - Run OpenLogin - Existing V2 User Login tests strategy: matrix: env: [prod] From 9f2b6be4eb4f1c309d0a10c2feafd594b18af962 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Fri, 15 Jul 2022 10:54:19 +0530 Subject: [PATCH 06/28] test discord run --- .../workflows/duplicate-openlogin.google.yml | 41 +++++++++++-------- 1 file changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index b071e5de..4a780898 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -1,4 +1,4 @@ -name: Duplicate - Existing V2 User Login +name: Duplicate - OpenLogin - Discord Login on: push @@ -8,11 +8,11 @@ on: env: NODE_VERSION: 16 - LOCAL_PATH: openlogin/existing-v2-user-login + LOCAL_PATH: openlogin/login-with-discord jobs: run-tests: - name: Duplicate - Run OpenLogin - Existing V2 User Login tests + name: Duplicate - Run OpenLogin - Discord Login tests strategy: matrix: env: [prod] @@ -32,7 +32,8 @@ jobs: runs-on: ${{ matrix.os }} env: PLATFORM: ${{ matrix.env }} - + outputs: + conclusion: ${{ steps.run-tests.conclusion }} steps: - name: Checkout uses: actions/checkout@v3 @@ -90,26 +91,13 @@ jobs: # if [[ ${{ steps.run-tests.outcome }} != 'success' ]] # then # echo "Test Failed, sending telegram alert" - # curl "https://api.telegram.org/bot${{secrets.BOT_API_TOKEN}}/sendMessage?chat_id=${{secrets.CHAT_ID}}&text=Existingv2UserLogin%0ATestresult=Failed%0AOS=${{matrix.os}}%0Abrowser=${{matrix.browser}}%0AEnvironment=${{matrix.env}}%0AJob=${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" + # curl "https://api.telegram.org/bot${{secrets.BOT_API_TOKEN}}/sendMessage?chat_id=${{secrets.CHAT_ID}}&text=LoginWithDiscord%0ATestresult=Failed%0AOS=${{matrix.os}}%0Abrowser=${{matrix.browser}}%0AEnvironment=${{matrix.env}}%0AJob=${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" # else # echo "Test Passed, no alert!" # fi # shell: bash # continue-on-error: true - - id: upload-state - name: Upload logged-in state once a week - uses: ./.github/actions/upload-state/ - with: - os: ${{ matrix.os }} - browser: ${{ matrix.browser }} - s3_path: ${{ env.S3_PATH }} - local_path: ${{ env.LOCAL_PATH }} - aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }} - aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - aws_region: us-east-1 - continue-on-error: true - - name: Upload test results if: always() uses: actions/upload-artifact@v3 @@ -117,3 +105,20 @@ jobs: name: test-results-on-${{ matrix.browser }}-${{ matrix.os }} path: test-results/ if-no-files-found: ignore + + # update-status: + # name: Update OpenLogin - Discord status + # needs: run-tests + # if: (success() || failure()) && (needs.run-tests.outputs.conclusion != 'skipped') + # runs-on: ubuntu-latest + # steps: + # - name: Update status + # uses: fjogeleit/http-request-action@master + # with: + # url: https://api.statuspage.io/v1/pages/${{ secrets.PAGE_ID }}/components/${{ secrets.DISCORD_COMPONENT_ID }} + # customHeaders: '{ "Authorization": "OAuth ${{ secrets.STATUS_PAGE_API_KEY }}" }' + # method: PATCH + # contentType: "application/json" + # timeout: 10000 + # data: >- + # { "component": { "status": "${{ needs.run-tests.result == 'success' && 'operational' || 'major_outage' }}" } } From 48f39ff6a5bb77ab3320400d203cc5343dd31a9a Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Fri, 15 Jul 2022 12:15:13 +0530 Subject: [PATCH 07/28] test facebook run --- .../workflows/duplicate-openlogin.google.yml | 26 +++++-------------- 1 file changed, 7 insertions(+), 19 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 4a780898..47c097d0 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -1,4 +1,4 @@ -name: Duplicate - OpenLogin - Discord Login +name: Duplicate - OpenLogin - Facebook Login on: push @@ -8,23 +8,16 @@ on: env: NODE_VERSION: 16 - LOCAL_PATH: openlogin/login-with-discord jobs: run-tests: - name: Duplicate - Run OpenLogin - Discord Login tests + name: Duplicate - Run OpenLogin - Facebook Login tests strategy: matrix: env: [prod] browser: [firefox, chromium] os: [macos-latest, windows-latest, ubuntu-latest] include: - - os: macos-latest - browser: chromium - env: cyan - - os: macos-latest - browser: webkit - env: beta - os: macos-latest browser: webkit env: prod @@ -68,21 +61,16 @@ jobs: aws-region: us-east-1 continue-on-error: true - - name: Set Path - run: | - echo "S3_PATH=${{ env.LOCAL_PATH }}-${{ matrix.env }}" >> $GITHUB_ENV - shell: bash - - id: download-state name: Download remote browser snapshots if: steps.configure-aws.outcome == 'success' - run: aws s3 cp s3://torus-e2e-tests/${{ env.S3_PATH }}/ ${{ env.LOCAL_PATH }}/ --recursive + run: aws s3 cp s3://torus-e2e-tests/openlogin/login-with-facebook/ openlogin/login-with-facebook/ --recursive continue-on-error: true - id: run-tests name: Run tests if: steps.download-state.outcome == 'success' - run: yarn run playwright test --config ${{ env.LOCAL_PATH }}/index.config.ts --project ${{ matrix.browser }} + run: yarn run playwright test --config openlogin/login-with-facebook/index.config.ts --project ${{ matrix.browser }} # - id: telegram-alert # name: Alert to telegram channel @@ -91,7 +79,7 @@ jobs: # if [[ ${{ steps.run-tests.outcome }} != 'success' ]] # then # echo "Test Failed, sending telegram alert" - # curl "https://api.telegram.org/bot${{secrets.BOT_API_TOKEN}}/sendMessage?chat_id=${{secrets.CHAT_ID}}&text=LoginWithDiscord%0ATestresult=Failed%0AOS=${{matrix.os}}%0Abrowser=${{matrix.browser}}%0AEnvironment=${{matrix.env}}%0AJob=${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" + # curl "https://api.telegram.org/bot${{secrets.BOT_API_TOKEN}}/sendMessage?chat_id=${{secrets.CHAT_ID}}&text=LoginWithFacebook%0ATestresult=Failed%0AOS=${{matrix.os}}%0Abrowser=${{matrix.browser}}%0AEnvironment=${{matrix.env}}%0AJob=${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" # else # echo "Test Passed, no alert!" # fi @@ -107,7 +95,7 @@ jobs: if-no-files-found: ignore # update-status: - # name: Update OpenLogin - Discord status + # name: Update OpenLogin - Facebook Login status # needs: run-tests # if: (success() || failure()) && (needs.run-tests.outputs.conclusion != 'skipped') # runs-on: ubuntu-latest @@ -115,7 +103,7 @@ jobs: # - name: Update status # uses: fjogeleit/http-request-action@master # with: - # url: https://api.statuspage.io/v1/pages/${{ secrets.PAGE_ID }}/components/${{ secrets.DISCORD_COMPONENT_ID }} + # url: https://api.statuspage.io/v1/pages/${{ secrets.PAGE_ID }}/components/${{ secrets.FACEBOOK_COMPONENT_ID }} # customHeaders: '{ "Authorization": "OAuth ${{ secrets.STATUS_PAGE_API_KEY }}" }' # method: PATCH # contentType: "application/json" From 91ed81737382f96dc49a79617fbd1f76a8425851 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 09:51:35 +0530 Subject: [PATCH 08/28] test run FB --- .../workflows/duplicate-openlogin.google.yml | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 47c097d0..5b68d707 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -72,19 +72,21 @@ jobs: if: steps.download-state.outcome == 'success' run: yarn run playwright test --config openlogin/login-with-facebook/index.config.ts --project ${{ matrix.browser }} - # - id: telegram-alert - # name: Alert to telegram channel - # if: always() - # run: | - # if [[ ${{ steps.run-tests.outcome }} != 'success' ]] - # then - # echo "Test Failed, sending telegram alert" - # curl "https://api.telegram.org/bot${{secrets.BOT_API_TOKEN}}/sendMessage?chat_id=${{secrets.CHAT_ID}}&text=LoginWithFacebook%0ATestresult=Failed%0AOS=${{matrix.os}}%0Abrowser=${{matrix.browser}}%0AEnvironment=${{matrix.env}}%0AJob=${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" - # else - # echo "Test Passed, no alert!" - # fi - # shell: bash - # continue-on-error: true + - id: telegram-alert + name: Alert to telegram channel + needs: run-tests + if: always() + run: | + echo ${{ steps.run-tests.outcome }} + echo ${{ needs.run-tests.result }} + if [[ ${{ steps.run-tests.outcome }} != 'success' ]] + then + echo "Test Failed, sending telegram alert" + else + echo "Test Passed, no alert!" + fi + shell: bash + continue-on-error: true - name: Upload test results if: always() @@ -93,6 +95,7 @@ jobs: name: test-results-on-${{ matrix.browser }}-${{ matrix.os }} path: test-results/ if-no-files-found: ignore + # curl "https://api.telegram.org/bot${{secrets.BOT_API_TOKEN}}/sendMessage?chat_id=${{secrets.CHAT_ID}}&text=LoginWithFacebook%0ATestresult=Failed%0AOS=${{matrix.os}}%0Abrowser=${{matrix.browser}}%0AEnvironment=${{matrix.env}}%0AJob=${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" # update-status: # name: Update OpenLogin - Facebook Login status From 29cc36052e3de313160f2b60b2dcd66b8b975b78 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 10:12:41 +0530 Subject: [PATCH 09/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 5b68d707..8f7a1ce8 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -74,11 +74,11 @@ jobs: - id: telegram-alert name: Alert to telegram channel - needs: run-tests + # needs: run-tests if: always() run: | echo ${{ steps.run-tests.outcome }} - echo ${{ needs.run-tests.result }} + echo ${{ steps.run-tests.result }} if [[ ${{ steps.run-tests.outcome }} != 'success' ]] then echo "Test Failed, sending telegram alert" From 794d459e13c022cba44f96d42df0d73b54ac5233 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 10:20:25 +0530 Subject: [PATCH 10/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 8f7a1ce8..3f8f43e9 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -15,12 +15,12 @@ jobs: strategy: matrix: env: [prod] - browser: [firefox, chromium] - os: [macos-latest, windows-latest, ubuntu-latest] - include: - - os: macos-latest - browser: webkit - env: prod + browser: [chromium] + os: [macos-latest] + # include: + # - os: macos-latest + # browser: webkit + # env: prod runs-on: ${{ matrix.os }} env: @@ -44,6 +44,7 @@ jobs: if: steps.setup-node.outcome == 'success' run: yarn install --frozen-lockfile continue-on-error: true + abc owjwodwdjowdjo jodjoojfojfjo - id: yarn-install-deps name: Install Ubuntu dependencies From e20b3f1e4126186c424ba88d2fb9370953f746b3 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 10:23:10 +0530 Subject: [PATCH 11/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 3f8f43e9..561445f8 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -42,9 +42,10 @@ jobs: - id: yarn-install name: Install Node.js dependencies if: steps.setup-node.outcome == 'success' - run: yarn install --frozen-lockfile + run: exit 1 + # run: yarn install --frozen-lockfile continue-on-error: true - abc owjwodwdjowdjo jodjoojfojfjo + - id: yarn-install-deps name: Install Ubuntu dependencies From c5319ec314096089aae010fb8618b9a221ddcce6 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 10:32:12 +0530 Subject: [PATCH 12/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 561445f8..9cf9aed5 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -42,8 +42,8 @@ jobs: - id: yarn-install name: Install Node.js dependencies if: steps.setup-node.outcome == 'success' - run: exit 1 - # run: yarn install --frozen-lockfile + # run: exit 1 + run: yarn install --frozen-lockfile continue-on-error: true @@ -72,8 +72,9 @@ jobs: - id: run-tests name: Run tests if: steps.download-state.outcome == 'success' - run: yarn run playwright test --config openlogin/login-with-facebook/index.config.ts --project ${{ matrix.browser }} - + # run: yarn run playwright test --config openlogin/login-with-facebook/index.config.ts --project ${{ matrix.browser }} + run: exit 1 + - id: telegram-alert name: Alert to telegram channel # needs: run-tests From 960c1883dff6e4cbec98c1b476e234a98a19a3a2 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 10:45:52 +0530 Subject: [PATCH 13/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 9cf9aed5..78048b93 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -74,7 +74,7 @@ jobs: if: steps.download-state.outcome == 'success' # run: yarn run playwright test --config openlogin/login-with-facebook/index.config.ts --project ${{ matrix.browser }} run: exit 1 - + - id: telegram-alert name: Alert to telegram channel # needs: run-tests @@ -82,7 +82,7 @@ jobs: run: | echo ${{ steps.run-tests.outcome }} echo ${{ steps.run-tests.result }} - if [[ ${{ steps.run-tests.outcome }} != 'success' ]] + if [[ ${{ steps.run-tests.outcome }} == 'failure' ]] then echo "Test Failed, sending telegram alert" else From 49bc4a402da538cbf36b46ed671afeb7be00783d Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 10:48:37 +0530 Subject: [PATCH 14/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 78048b93..fe80ec46 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -42,8 +42,8 @@ jobs: - id: yarn-install name: Install Node.js dependencies if: steps.setup-node.outcome == 'success' - # run: exit 1 - run: yarn install --frozen-lockfile + run: exit 1 + # run: yarn install --frozen-lockfile continue-on-error: true @@ -72,8 +72,8 @@ jobs: - id: run-tests name: Run tests if: steps.download-state.outcome == 'success' - # run: yarn run playwright test --config openlogin/login-with-facebook/index.config.ts --project ${{ matrix.browser }} - run: exit 1 + run: yarn run playwright test --config openlogin/login-with-facebook/index.config.ts --project ${{ matrix.browser }} + # run: exit 1 - id: telegram-alert name: Alert to telegram channel From 7c9596ba92c9d2cab9f280b708044e2be08f0274 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 10:51:03 +0530 Subject: [PATCH 15/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index fe80ec46..d3031318 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -42,8 +42,8 @@ jobs: - id: yarn-install name: Install Node.js dependencies if: steps.setup-node.outcome == 'success' - run: exit 1 - # run: yarn install --frozen-lockfile + # run: exit 1 + run: yarn install --frozen-lockfile continue-on-error: true From f4ec63156e015ae341a173aac757a57cbc0d7bcb Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 12:14:07 +0530 Subject: [PATCH 16/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index d3031318..1182b0b0 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -72,8 +72,8 @@ jobs: - id: run-tests name: Run tests if: steps.download-state.outcome == 'success' - run: yarn run playwright test --config openlogin/login-with-facebook/index.config.ts --project ${{ matrix.browser }} - # run: exit 1 + # run: yarn run playwright test --config openlogin/login-with-facebook/index.config.ts --project ${{ matrix.browser }} + run: exit 1 - id: telegram-alert name: Alert to telegram channel @@ -84,6 +84,8 @@ jobs: echo ${{ steps.run-tests.result }} if [[ ${{ steps.run-tests.outcome }} == 'failure' ]] then + RESPONSE =$(curl "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}") + echo $RESPONSE echo "Test Failed, sending telegram alert" else echo "Test Passed, no alert!" From d8417e000aa1b622aea3b79b4c8072cdd76ef68a Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 12:36:27 +0530 Subject: [PATCH 17/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 1182b0b0..360a60db 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -84,8 +84,8 @@ jobs: echo ${{ steps.run-tests.result }} if [[ ${{ steps.run-tests.outcome }} == 'failure' ]] then - RESPONSE =$(curl "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}") - echo $RESPONSE + response=$(curl "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}") + echo "response: $response" echo "Test Failed, sending telegram alert" else echo "Test Passed, no alert!" From d05d53a0d6ce8d838959af1a0ec46de51758edb3 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 12:38:36 +0530 Subject: [PATCH 18/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 360a60db..bca00849 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -85,7 +85,7 @@ jobs: if [[ ${{ steps.run-tests.outcome }} == 'failure' ]] then response=$(curl "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}") - echo "response: $response" + echo "conclusion: $response.conclusion" echo "Test Failed, sending telegram alert" else echo "Test Passed, no alert!" From c7e61c95d82e490b6f47647f2f274885132ed9d6 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 12:40:54 +0530 Subject: [PATCH 19/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index bca00849..40b4554d 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -85,7 +85,7 @@ jobs: if [[ ${{ steps.run-tests.outcome }} == 'failure' ]] then response=$(curl "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}") - echo "conclusion: $response.conclusion" + echo "conclusion: ${{response.conclusion}}" echo "Test Failed, sending telegram alert" else echo "Test Passed, no alert!" From ed3895c7fde54c8ecf19f0db5ef40f36b653d058 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 12:41:52 +0530 Subject: [PATCH 20/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 40b4554d..64115e54 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -85,7 +85,7 @@ jobs: if [[ ${{ steps.run-tests.outcome }} == 'failure' ]] then response=$(curl "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}") - echo "conclusion: ${{response.conclusion}}" + echo "conclusion: ${{response['conclusion']}}" echo "Test Failed, sending telegram alert" else echo "Test Passed, no alert!" From 48bfc21815dd9e024459b1d579bbfc60562448c6 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 12:43:45 +0530 Subject: [PATCH 21/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 64115e54..bcdaa9fe 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -85,7 +85,7 @@ jobs: if [[ ${{ steps.run-tests.outcome }} == 'failure' ]] then response=$(curl "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}") - echo "conclusion: ${{response['conclusion']}}" + echo $(response['conclusion']) echo "Test Failed, sending telegram alert" else echo "Test Passed, no alert!" From ae6098bd650efb78dc1ab3f6577879a14a4b6726 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 12:47:01 +0530 Subject: [PATCH 22/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index bcdaa9fe..41ff7ce9 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -85,7 +85,7 @@ jobs: if [[ ${{ steps.run-tests.outcome }} == 'failure' ]] then response=$(curl "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}") - echo $(response['conclusion']) + echo $response['conclusion'] echo "Test Failed, sending telegram alert" else echo "Test Passed, no alert!" From 2cc3abad0f7b754e290ed7a0d9d19002476caf1e Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 13:15:14 +0530 Subject: [PATCH 23/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 41ff7ce9..01659494 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -84,8 +84,8 @@ jobs: echo ${{ steps.run-tests.result }} if [[ ${{ steps.run-tests.outcome }} == 'failure' ]] then - response=$(curl "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}") - echo $response['conclusion'] + # response=curl "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}" + echo "attempt: ${{github.run_attempt}}" echo "Test Failed, sending telegram alert" else echo "Test Passed, no alert!" From 204d846570e5c65fe2a848a76f1e9cdd7baefced Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 13:17:15 +0530 Subject: [PATCH 24/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 01659494..84356a68 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -84,7 +84,6 @@ jobs: echo ${{ steps.run-tests.result }} if [[ ${{ steps.run-tests.outcome }} == 'failure' ]] then - # response=curl "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}" echo "attempt: ${{github.run_attempt}}" echo "Test Failed, sending telegram alert" else @@ -100,6 +99,8 @@ jobs: name: test-results-on-${{ matrix.browser }}-${{ matrix.os }} path: test-results/ if-no-files-found: ignore + + # response=curl "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}" # curl "https://api.telegram.org/bot${{secrets.BOT_API_TOKEN}}/sendMessage?chat_id=${{secrets.CHAT_ID}}&text=LoginWithFacebook%0ATestresult=Failed%0AOS=${{matrix.os}}%0Abrowser=${{matrix.browser}}%0AEnvironment=${{matrix.env}}%0AJob=${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" # update-status: From b53defd731dfb8b5aff380fc8e34f66a43556f08 Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 13:42:05 +0530 Subject: [PATCH 25/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 84356a68..106a6bdf 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -85,7 +85,13 @@ jobs: if [[ ${{ steps.run-tests.outcome }} == 'failure' ]] then echo "attempt: ${{github.run_attempt}}" - echo "Test Failed, sending telegram alert" + if [[ ${{github.run_attempt}} < 2 ]] + then + echo "attempt < 2, re-running job" + curl -X POST "https://api.github.com/repos/OWNER/REPO/actions/runs/${{github.run_id}}/rerun" + else: + echo "attempt >= 2, and failed sending telegram alert" + fi else echo "Test Passed, no alert!" fi @@ -99,7 +105,7 @@ jobs: name: test-results-on-${{ matrix.browser }}-${{ matrix.os }} path: test-results/ if-no-files-found: ignore - + # response=curl "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}" # curl "https://api.telegram.org/bot${{secrets.BOT_API_TOKEN}}/sendMessage?chat_id=${{secrets.CHAT_ID}}&text=LoginWithFacebook%0ATestresult=Failed%0AOS=${{matrix.os}}%0Abrowser=${{matrix.browser}}%0AEnvironment=${{matrix.env}}%0AJob=${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}" From f14c2a613fb807ea451d7375efcc487663836ecd Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Mon, 18 Jul 2022 13:46:22 +0530 Subject: [PATCH 26/28] test run FB --- .github/workflows/duplicate-openlogin.google.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 106a6bdf..5c17e4cd 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -88,7 +88,7 @@ jobs: if [[ ${{github.run_attempt}} < 2 ]] then echo "attempt < 2, re-running job" - curl -X POST "https://api.github.com/repos/OWNER/REPO/actions/runs/${{github.run_id}}/rerun" + curl -X POST "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}/rerun" else: echo "attempt >= 2, and failed sending telegram alert" fi From 7b8f6cdea6e091528ff3e2c33a0dbc1d692f8fcb Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Tue, 19 Jul 2022 10:32:36 +0530 Subject: [PATCH 27/28] run test FB --- .github/workflows/duplicate-openlogin.google.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 5c17e4cd..276410db 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -88,7 +88,7 @@ jobs: if [[ ${{github.run_attempt}} < 2 ]] then echo "attempt < 2, re-running job" - curl -X POST "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}/rerun" + curl -X POST --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}/rerun" else: echo "attempt >= 2, and failed sending telegram alert" fi From e1b24b327d0315f60ccae5694b12bc3642479fab Mon Sep 17 00:00:00 2001 From: Shubham Pandey Date: Tue, 19 Jul 2022 10:53:19 +0530 Subject: [PATCH 28/28] run test FB --- .github/workflows/duplicate-openlogin.google.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/duplicate-openlogin.google.yml b/.github/workflows/duplicate-openlogin.google.yml index 276410db..e47dd37e 100644 --- a/.github/workflows/duplicate-openlogin.google.yml +++ b/.github/workflows/duplicate-openlogin.google.yml @@ -88,7 +88,7 @@ jobs: if [[ ${{github.run_attempt}} < 2 ]] then echo "attempt < 2, re-running job" - curl -X POST --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}/rerun" + curl -X POST --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/jobs/${{github.job_id}}/rerun" else: echo "attempt >= 2, and failed sending telegram alert" fi @@ -106,6 +106,7 @@ jobs: path: test-results/ if-no-files-found: ignore + # curl -X POST --header "authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}/cencel" # response=curl "https://api.github.com/repos/torusresearch/torus-e2e-tests/actions/runs/${{github.run_id}}" # curl "https://api.telegram.org/bot${{secrets.BOT_API_TOKEN}}/sendMessage?chat_id=${{secrets.CHAT_ID}}&text=LoginWithFacebook%0ATestresult=Failed%0AOS=${{matrix.os}}%0Abrowser=${{matrix.browser}}%0AEnvironment=${{matrix.env}}%0AJob=${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}"