-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add vercel preview url step #3898
base: main
Are you sure you want to change the base?
Changes from 9 commits
068f01b
9a286fb
05f8e85
03333e3
dcbd342
8f617e8
bd8b43e
14ca514
801d09d
a05e397
df3d61a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,11 +8,6 @@ on: | |
default: 'main' | ||
required: false | ||
type: string | ||
base-url: | ||
description: 'The AppKit lab url' | ||
default: 'http://localhost:3000/' | ||
required: false | ||
type: string | ||
wallet-url: | ||
description: 'The wallet url' | ||
default: 'https://react-wallet.walletconnect.com/' | ||
|
@@ -80,66 +75,40 @@ jobs: | |
node-version: 20.x | ||
cache: 'pnpm' | ||
|
||
# - name: Get installed Playwright version | ||
# id: playwright-version | ||
# run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package-lock.json').packages['apps/laboratory']['devDependencies']['@playwright/test'])")" >> $GITHUB_ENV | ||
|
||
# This cache causes weird errors on retry runs when using the self-hosted runners, disabling for now | ||
# - name: Cache playwright binaries | ||
# uses: actions/cache@v4 | ||
# id: playwright-cache | ||
# with: | ||
# path: | | ||
# ~/.cache/ms-playwright | ||
# key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}-${{ hashFiles('apps/laboratory/tests/shared/constants/devices.ts') }} | ||
|
||
- name: Install dependencies | ||
run: pnpm install | ||
|
||
- name: build packages and lab | ||
run: pnpm build:laboratory | ||
env: | ||
NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }} | ||
NEXTAUTH_SECRET: ${{ secrets.TESTS_NEXTAUTH_SECRET }} | ||
MAILSAC_API_KEY: ${{ secrets.TESTS_MAILSAC_API_KEY }} | ||
NEXT_PUBLIC_SECURE_SITE_SDK_URL: ${{ inputs.secure-site-url }} | ||
SOCIAL_TEST_EMAIL: ${{ secrets.TESTS_SOCIAL_EMAIL }} | ||
SOCIAL_TEST_PASSWORD: ${{ secrets.TESTS_SOCIAL_PASSWORD }} | ||
- name: Build packages | ||
run: pnpm build | ||
|
||
- name: build extension | ||
- name: Build extension | ||
env: | ||
EIP155_PRIVATE_KEY: ${{ secrets.EIP155_PRIVATE_KEY }} | ||
SOLANA_PRIVATE_KEY: ${{ secrets.SOLANA_PRIVATE_KEY }} | ||
working-directory: ./apps/browser-extension/ | ||
run: pnpm build | ||
|
||
- name: Wait for Vercel Preview URL | ||
uses: UnlyEd/github-action-await-vercel@v1 # TODO best practices recommend to use a fixed version instead of @v1 for production usage (i.e: @v1.2.32) | ||
id: await-vercel | ||
env: | ||
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} | ||
with: | ||
deployment-url: appkit-lab.reown.com # TODO Replace by the domain you want to test | ||
timeout: 10 # Wait for 10 seconds before failing | ||
poll-interval: 1 # Wait for 1 second before each retry | ||
|
||
- name: Display deployment status | ||
run: 'echo The deployment at ${{ fromJson(steps.await-vercel.outputs.deploymentDetails).url }} is ${{ fromJson(steps.await-vercel.outputs.deploymentDetails).readyState }}' | ||
|
||
- name: Install Playwright Browsers | ||
if: steps.playwright-cache.outputs.cache-hit != 'true' | ||
working-directory: ./apps/laboratory/ | ||
run: pnpm playwright:install | ||
|
||
# - name: Build MetaMask wallet cache | ||
# working-directory: ./apps/laboratory/ | ||
# run: xvfb-run pnpm synpress | ||
|
||
# - name: Run MetaMask Playwright tests (headful) | ||
# working-directory: ./apps/laboratory/ | ||
# env: | ||
# BASE_URL: ${{ inputs.base-url }} | ||
# WALLET_URL: ${{ inputs.wallet-url }} | ||
# NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }} | ||
# SKIP_PLAYWRIGHT_WEBSERVER: ${{ inputs.skip-playwright-webserver }} | ||
# NEXTAUTH_SECRET: ${{ secrets.TESTS_NEXTAUTH_SECRET }} | ||
# MAILSAC_API_KEY: ${{ secrets.TESTS_MAILSEC_API_KEY }} | ||
# NEXT_PUBLIC_SECURE_SITE_SDK_URL: ${{ inputs.secure-site-url }} | ||
# SOCIAL_TEST_EMAIL: ${{ secrets.TESTS_SOCIAL_EMAIL }} | ||
# SOCIAL_TEST_PASSWORD: ${{ secrets.TESTS_SOCIAL_PASSWORD }} | ||
# CI: true | ||
# run: xvfb-run pnpm playwright:test:metamask | ||
|
||
- name: Run Playwright tests | ||
env: | ||
BASE_URL: ${{ inputs.base-url }} | ||
BASE_URL: https://${{ fromJson(steps.await-vercel.outputs.deploymentDetails).url }}/ | ||
WALLET_URL: ${{ inputs.wallet-url }} | ||
NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }} | ||
SKIP_PLAYWRIGHT_WEBSERVER: ${{ inputs.skip-playwright-webserver }} | ||
|
@@ -152,15 +121,16 @@ jobs: | |
working-directory: ./apps/laboratory/ | ||
run: pnpm ${{ inputs.command }} --shard=${{ matrix.shard }}/${{ matrix.shardTotal }} | ||
|
||
- name: Run canary with minimal environment config | ||
env: | ||
# DO NOT MODIFY THIS. If you are required to add variables here without adding | ||
# them to the rs-relay repo it will cause alarms. | ||
NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }} | ||
NEXTAUTH_SECRET: ${{ secrets.TESTS_NEXTAUTH_SECRET }} | ||
CI: true | ||
working-directory: ./apps/laboratory/ | ||
run: pnpm playwright:test:canary | ||
# Disable temporarily | ||
# - name: Run canary with minimal environment config | ||
# env: | ||
# # DO NOT MODIFY THIS. If you are required to add variables here without adding | ||
# # them to the rs-relay repo it will cause alarms. | ||
# NEXT_PUBLIC_PROJECT_ID: ${{ secrets.NEXT_PUBLIC_PROJECT_ID }} | ||
# NEXTAUTH_SECRET: ${{ secrets.TESTS_NEXTAUTH_SECRET }} | ||
# CI: true | ||
# working-directory: ./apps/laboratory/ | ||
# run: pnpm playwright:test:canary | ||
Comment on lines
+124
to
+133
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why disable? |
||
|
||
- uses: actions/upload-artifact@v4 | ||
if: failure() | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -365,12 +365,13 @@ export class ModalPage { | |
const signatureHeader = this.page.getByText('Approve Transaction') | ||
await this.page.frameLocator('#w3m-iframe').getByRole('button', { name, exact: true }).click() | ||
await expect(signatureHeader, 'Signature request should be closed').not.toBeVisible() | ||
await this.page.waitForTimeout(300) | ||
await this.page.waitForTimeout(500) | ||
} | ||
|
||
async approveSign() { | ||
await this.signatureRequestFrameShouldVisible('requests a signature') | ||
await this.clickSignatureRequestButton('Sign') | ||
await this.page.waitForTimeout(1000) | ||
Comment on lines
+368
to
+374
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do we still need these timeouts? |
||
} | ||
|
||
async rejectSign() { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,6 @@ const SINGLE_ADAPTER_EVM_TESTS = [ | |
'wallet-features.spec.ts', | ||
'wallet.spec.ts', | ||
'wallet-button.spec', | ||
'verify.spec.ts', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Revert Canary and Verify tests back |
||
'email-after-farcaster.spec.ts' | ||
] | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this ok?