Skip to content

feat: introduce jumper solana provider #7060

feat: introduce jumper solana provider

feat: introduce jumper solana provider #7060

Workflow file for this run

name: Playwright Tests
on:
- pull_request
- workflow_dispatch
permissions:
checks: write
pull-requests: write
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
create-qase-run:
name: Create Qase Run
runs-on: ubuntu-latest
continue-on-error: true
timeout-minutes: 3
outputs:
run_id: ${{ steps.create-run.outputs.run_id }}
public_link: ${{ steps.create-public-link.outputs.public_link }}
steps:
- name: Create Qase Test Run
id: create-run
env:
QASE_TOKEN: ${{ secrets.QASE_TOKEN }}
GH_RUN_ID: ${{ github.run_id }}
GH_EVENT_NAME: ${{ github.event_name }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
if [ -z "$QASE_TOKEN" ]; then
echo "No Qase API token available, skipping Qase run creation"
exit 0
fi
RUN_TITLE="[Jumper] CI Run $GH_RUN_ID"
if [ "$GH_EVENT_NAME" = "pull_request" ]; then
DESCRIPTION="Pull Request: [$PR_URL]($PR_URL)"
else
DESCRIPTION=""
fi
data=$(jq -n \
--arg title "$RUN_TITLE" \
--arg description "$DESCRIPTION" \
'{title: $title, description: $description}')
response=$(curl --silent --fail --show-error --request POST \
--url https://api.qase.io/v1/run/WJ \
--header "Token: $QASE_TOKEN" \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data "$data")
run_id=$(echo "$response" | jq -r '.result.id')
echo "run_id=$run_id" >> "$GITHUB_OUTPUT"
echo "Qase API Response: $response"
echo "Extracted Run ID: $run_id"
- name: Create public link to run
id: create-public-link
env:
QASE_TOKEN: ${{ secrets.QASE_TOKEN }}
QASE_RUN_ID: ${{ steps.create-run.outputs.run_id }}
run: |
public_link=$(curl --silent --fail --show-error --request PATCH \
--url "https://api.qase.io/v1/run/WJ/$QASE_RUN_ID/public" \
--header "Token: $QASE_TOKEN" \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{"status":true}' \
| jq -r '.result.url')
echo "public_link=$public_link" >> "$GITHUB_OUTPUT"
echo "Public link: $public_link"
test:
needs: [create-qase-run]
name: Test (${{ matrix.shard }} / ${{ strategy.job-total}})
continue-on-error: false # Instead we use fail-fast to forward the failure state to subsequent jobs
timeout-minutes: 20
runs-on: ubuntu-latest
strategy:
matrix:
shard: [1, 2, 3, 4, 5]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm install
- name: Install Playwright Browsers
run: |
pnpm exec playwright install --with-deps chromium
- name: Run Playwright tests
env:
QASE_TESTOPS_RUN_ID: ${{ needs.create-qase-run.outputs.run_id || '' }}
QASE_TESTOPS_API_TOKEN: ${{ secrets.QASE_TOKEN }}
SHARD: ${{ matrix.shard }}/${{ strategy.job-total }}
if: ${{ !cancelled()}} # Always attempt to run the tests even if cache setup failed
run: |
if [ -n "$QASE_TESTOPS_API_TOKEN" ] && [ -n "$QASE_TESTOPS_RUN_ID" ]; then
echo "Running tests with Qase reporting (Run ID: $QASE_TESTOPS_RUN_ID)"
pnpm run test:ci:e2e:qase \
--shard "$SHARD"
else
echo "Running tests without Qase reporting (API token or run ID not available)"
pnpm run test:ci:e2e \
--shard "$SHARD"
fi
- name: Upload blob report to Github Actions Artifacts
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v4
with:
name: blob-report-${{ matrix.shard }}
path: blob-report
retention-days: 1
merge-reports:
if: ${{ !cancelled() }}
needs: [test]
timeout-minutes: 3
outputs:
summary: ${{ steps.summary.outputs.summary }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- uses: actions/setup-node@v4
with:
node-version: 20
cache: "pnpm"
- name: Install dependencies
run: pnpm install
- name: Download blob reports from GitHub Actions Articfacts
uses: actions/download-artifact@v4
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true
- name: Merge into HTML and JSON Reports
run: npx playwright merge-reports --reporter=html,json ./all-blob-reports
env:
PLAYWRIGHT_JSON_OUTPUT_NAME: report.json
- uses: daun/playwright-report-summary@be9e270edd5ad86038604d3caa84a819a6ff6fed # v3.10.0
id: summary
with:
report-file: ./report.json
create-comment: false
- name: Upload HTML report
uses: actions/upload-artifact@v4
with:
name: html-report--attempt-${{ github.run_attempt }}
path: playwright-report
retention-days: 2
post-comment:
needs: [create-qase-run, merge-reports]
if: ${{ !cancelled() && github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- uses: marocchino/sticky-pull-request-comment@v2
with:
message: |
${{ needs.merge-reports.outputs.summary }}
${{ needs.create-qase-run.outputs.public_link != '' && needs.create-qase-run.outputs.public_link != null && format('📋 [View Detailed Qase Report]({0})', needs.create-qase-run.outputs.public_link) || '' }}
notify-slack-on-failure:
needs: [create-qase-run, test, merge-reports]
if: ${{ failure() && github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
steps:
- name: Build Slack payload
id: build-payload
env:
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
QASE_LINK: ${{ needs.create-qase-run.outputs.public_link }}
PR_URL: ${{ github.event.pull_request.html_url }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
REPO_NAME: ${{ github.repository }}
REPO_URL: ${{ github.server_url }}/${{ github.repository }}
WORKFLOW_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
run: |
# Build blocks using jq — all values come from safe env vars
BLOCKS=$(jq -n \
--arg author "$PR_AUTHOR" \
--arg repo_url "$REPO_URL" \
--arg repo_name "$REPO_NAME" \
--arg pr_url "$PR_URL" \
--arg pr_number "$PR_NUMBER" \
--arg pr_title "$PR_TITLE" \
--arg workflow_url "$WORKFLOW_URL" \
--arg qase_link "$QASE_LINK" \
'[
{
"type": "header",
"text": {
"type": "plain_text",
"text": "❌ UI Tests Failed"
}
},
{
"type": "section",
"fields": [
{
"type": "mrkdwn",
"text": "*Repository:*\n<\($repo_url)|\($repo_name)>"
},
{
"type": "mrkdwn",
"text": "*Pull Request:*\n<\($pr_url)|#\($pr_number) - \($pr_title)>"
},
{
"type": "mrkdwn",
"text": "*Author:*\n<@\($author)>"
},
{
"type": "mrkdwn",
"text": "*Workflow Run:*\n<\($workflow_url)|View Run>"
}
]
}
] + (if $qase_link != "" and $qase_link != "null" then [{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "*Qase Report:* <\($qase_link)|View Detailed Report>"
}
}] else [] end) + [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "<@\($author)> Please review the test failures and fix any issues."
}
},
{
"type": "divider"
}
]')
PAYLOAD=$(jq -n \
--argjson blocks "$BLOCKS" \
'{
"channel": "#jumper-ui-tests",
"text": "❌ UI Tests Failed",
"blocks": $blocks
}')
echo "payload<<EOF" >> "$GITHUB_OUTPUT"
echo "$PAYLOAD" >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
- name: Send Slack notification
uses: slackapi/slack-github-action@v2
with:
webhook-type: incoming-webhook
webhook: ${{ secrets.SLACK_WEBHOOK_URL_UI_TESTS }}
payload: ${{ steps.build-payload.outputs.payload }}