Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

Commit 0d153ef

Browse files
committed
Fix: Applied another approach to run smoke against vercel 3
1 parent 3494b5b commit 0d153ef

File tree

2 files changed

+42
-31
lines changed

2 files changed

+42
-31
lines changed

.github/workflows/pr-check.yml

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -110,34 +110,34 @@ jobs:
110110

111111
- name: test
112112
run: yarn run test
113-
smoke-tests-preparation:
114-
runs-on: ubuntu-latest
115-
needs: [build]
116-
outputs:
117-
vercel_preview_url: ${{ steps.vercel_url.outputs.vercel_preview_url }}
118-
steps:
119-
- name: Checkout
120-
uses: actions/checkout@v3
121-
122-
- name: Get Vercel Preview URL
123-
id: vercel_url
124-
run: |
125-
RESPONSE=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
126-
"https://api.github.com/repos/${{ github.repository }}/commits/${{ github.sha }}/statuses")
127-
128-
echo "Response from API:"
129-
echo "$RESPONSE"
130-
131-
# Then you can try accessing the statuses only if it exists.
132-
PREVIEW_URL=$(echo "$RESPONSE" | jq -r '.statuses[] | select(.context=="Vercel") | .target_url' | head -n 1)
133-
134-
echo "Vercel preview URL: $PREVIEW_URL"
135-
echo "vercel_preview_url=$PREVIEW_URL" >> $GITHUB_OUTPUT
136-
137-
138-
run-smoke-test:
139-
needs: [smoke-tests-preparation]
140-
uses: mento-protocol/mento-automation-tests/.github/workflows/smoke-mento-web-test.yml@main
141-
with:
142-
CUSTOM_URL: ${{ needs.smoke-tests-preparation.outputs.vercel_preview_url }}
143-
IS_MAINNET: "false"
113+
# smoke-tests-preparation:
114+
# runs-on: ubuntu-latest
115+
# needs: [build]
116+
# outputs:
117+
# vercel_preview_url: ${{ steps.vercel_url.outputs.vercel_preview_url }}
118+
# steps:
119+
# - name: Checkout
120+
# uses: actions/checkout@v3
121+
#
122+
# - name: Get Vercel Preview URL
123+
# id: vercel_url
124+
# run: |
125+
# RESPONSE=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
126+
# "https://api.github.com/repos/${{ github.repository }}/commits/${{ github.sha }}/statuses")
127+
#
128+
# echo "Response from API:"
129+
# echo "$RESPONSE"
130+
#
131+
# # Then you can try accessing the statuses only if it exists.
132+
# PREVIEW_URL=$(echo "$RESPONSE" | jq -r '.statuses[] | select(.context=="Vercel") | .target_url' | head -n 1)
133+
#
134+
# echo "Vercel preview URL: $PREVIEW_URL"
135+
# echo "vercel_preview_url=$PREVIEW_URL" >> $GITHUB_OUTPUT
136+
#
137+
#
138+
# run-smoke-test:
139+
# needs: [smoke-tests-preparation]
140+
# uses: mento-protocol/mento-automation-tests/.github/workflows/smoke-mento-web-test.yml@main
141+
# with:
142+
# CUSTOM_URL: ${{ needs.smoke-tests-preparation.outputs.vercel_preview_url }}
143+
# IS_MAINNET: "false"

.github/workflows/smoke-test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: Smoke Test Run
2+
on:
3+
deployment_status:
4+
5+
jobs:
6+
smoke-test:
7+
if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success'
8+
uses: mento-protocol/mento-automation-tests/.github/workflows/smoke-mento-web-test.yml@main
9+
with:
10+
CUSTOM_URL: ${{ github.event.deployment_status.environment_url }}
11+
IS_MAINNET: "false"

0 commit comments

Comments
 (0)