-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
18 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,26 @@ | ||
name: Checks | ||
|
||
env: | ||
VERCEL_TEAM_ID: ${{ secrets.VERCEL_TEAM_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.UI_TEST_WALLET_V2_VERCEL_PROJECT_ID }} | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- feat/tests | ||
|
||
concurrency: | ||
# Support push/pr as event types with different behaviors each: | ||
# 1. push: queue up builds | ||
# 2. pr: only allow one run per PR | ||
group: ${{ github.workflow }}-${{ github.event.type }}${{ github.event.pull_request.number }} | ||
# If there is already a workflow running for the same pull request, cancel it | ||
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | ||
|
||
branches-ignore: | ||
- main | ||
jobs: | ||
ui_tests: | ||
Deploy-Preview: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
repository: WalletConnect/web3modal | ||
ref: V3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- run: sleep 30 | ||
- name: Wait for Vercel Preview URL with App Name | ||
id: vercel_preview_url_by_name | ||
uses: zentered/vercel-preview-url@v1.1.9 | ||
env: | ||
VERCEL_TOKEN: ${{ secrets.UI_TEST_VERCEL_TOKEN }} | ||
with: | ||
vercel_app: ${{ secrets.UI_TEST_WALLET_V2_VERCEL_PROJECT_ID }} | ||
vercel_team_id: ${{ secrets.VERCEL_TEAM_ID }} | ||
- name: Get URL | ||
run: echo "https://${{steps.vercel_preview_url_by_name.outputs.preview_url}}" | ||
- name: Install Vercel CLI | ||
run: npm install --global vercel@latest | ||
working-directory: ./advanced/wallets/react-wallet-v2/ | ||
- name: Pull Vercel Environment Information | ||
run: vercel pull --yes --environment=preview --token=${{ secrets.UI_TEST_VERCEL_TOKEN }} | ||
working-directory: ./advanced/wallets/react-wallet-v2/ | ||
- name: Build Project Artifacts | ||
run: vercel build --token=${{ secrets.UI_TEST_VERCEL_TOKEN }} | ||
working-directory: ./advanced/wallets/react-wallet-v2/ | ||
- name: Deploy Project Artifacts to Vercel | ||
run: vercel deploy --prebuilt --token=${{ secrets.UI_TEST_VERCEL_TOKEN }} | ||
working-directory: ./advanced/wallets/react-wallet-v2/ |