-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clean-up Move workflows Update path Remove dep Move app url Do no allow to deploy dev to main Fix typing Fix typing pr-labels Add runs-on Update field Ignore transactions labels as a first step Remove get label step Update condition Update condition Update condition remove labels web build deployment-url Update cd workflow
- Loading branch information
1 parent
79ae790
commit c072a65
Showing
8 changed files
with
143 additions
and
199 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
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
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,45 +1,15 @@ | ||
name: Tonkeeper Playwright | ||
name: Tonkeeper Web Playwright | ||
on: | ||
workflow_dispatch: | ||
inputs: | ||
base-url: | ||
type: string | ||
description: App Url | ||
default: https://wallet.tonkeeper.com | ||
jobs: | ||
playwright-tests: | ||
name: playwright-tests | ||
timeout-minutes: 60 | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout to git repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: lts/* | ||
|
||
- name: Enable Corepack | ||
run: | | ||
corepack enable | ||
- name: Run install | ||
uses: borales/actions-yarn@v5 | ||
with: | ||
cmd: install | ||
|
||
- name: Install Playwright Browsers | ||
working-directory: ./tests/playwright | ||
run: npx playwright install --with-deps chromium | ||
|
||
- name: Run Playwright tests | ||
working-directory: ./tests/playwright | ||
env: | ||
BASE_APP_URL: https://wallet.tonkeeper.com | ||
TON_MNEMONIC_24: ${{ secrets.TON_MNEMONIC_24 }} | ||
TON_MNEMONIC_24_2: ${{ secrets.TON_MNEMONIC_24_2 }} | ||
TON_MNEMONIC_24_3: ${{ secrets.TON_MNEMONIC_24_3 }} | ||
TON_MNEMONIC_24_4: ${{ secrets.TON_MNEMONIC_24_4 }} | ||
TON_MNEMONIC_24_5: ${{ secrets.TON_MNEMONIC_24_5 }} | ||
TON_MNEMONIC_ANANAS: ${{ secrets.TON_MNEMONIC_ANANAS }} | ||
TON_MNEMONIC_12: ${{ secrets.TON_MNEMONIC_12 }} | ||
TON_MNEMONIC_12_2: ${{ secrets.TON_MNEMONIC_12_2 }} | ||
FAKE_MNEMONIC: ${{ secrets.FAKE_MNEMONIC }} | ||
run: npx playwright test --project='chromium' | ||
web-tests: | ||
uses: ./.github/workflows/web-tests.yaml | ||
with: | ||
base-url: ${{ inputs.base-url }} | ||
transaction: true | ||
secrets: inherit |
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
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 |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Tonkeeper Web Build | ||
on: | ||
workflow_call: | ||
inputs: | ||
environment: | ||
required: true | ||
type: string | ||
secrets: | ||
REACT_APP_AMPLITUDE_EXTENSION: | ||
required: true | ||
REACT_APP_MEASUREMENT_ID: | ||
required: true | ||
VITE_APP_APTABASE: | ||
required: true | ||
REACT_APP_TG_BOT_ID: | ||
required: true | ||
REACT_APP_STONFI_REFERRAL_ADDRESS: | ||
required: true | ||
CLOUDFLARE_API_TOKEN: | ||
required: true | ||
CLOUDFLARE_ACCOUNT_ID: | ||
required: true | ||
outputs: | ||
deployment-url: | ||
description: 'The app deployment url' | ||
value: ${{ jobs.web-build.outputs.deployment-url }} | ||
env: | ||
node-version: 20.11.1 | ||
|
||
jobs: | ||
web-build: | ||
name: web-build | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 10 | ||
|
||
outputs: | ||
deployment-url: ${{ steps.deploy.outputs.deployment-url }} | ||
steps: | ||
- name: Checkout to git repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Node | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ env.node-version }} | ||
|
||
- name: Enable Corepack | ||
run: | | ||
corepack enable | ||
- name: Run install | ||
uses: borales/actions-yarn@v5 | ||
with: | ||
cmd: install | ||
|
||
- name: Run build | ||
uses: borales/actions-yarn@v5 | ||
env: | ||
VITE_APP_AMPLITUDE: ${{ secrets.REACT_APP_AMPLITUDE_EXTENSION }} | ||
VITE_APP_MEASUREMENT_ID: ${{ secrets.REACT_APP_MEASUREMENT_ID }} | ||
VITE_APP_APTABASE: ${{ secrets.VITE_APP_APTABASE }} | ||
VITE_APP_APTABASE_HOST: https://anonymous-analytics.tonkeeper.com | ||
VITE_APP_LOCALES: en,zh_TW,zh_CN,id,ru,it,es,uk,tr,bg,uz,bn | ||
VITE_APP_TONCONSOLE_HOST: https://pro.tonconsole.com | ||
VITE_APP_TG_BOT_ID: ${{ secrets.REACT_APP_TG_BOT_ID }} | ||
VITE_APP_STONFI_REFERRAL_ADDRESS: ${{ secrets.REACT_APP_STONFI_REFERRAL_ADDRESS }} | ||
with: | ||
cmd: build:web | ||
|
||
- name: Publish to Cloudflare Pages | ||
id: deploy | ||
uses: cloudflare/wrangler-action@v3 | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | ||
command: | ||
pages deploy apps/web/dist --project-name=tonkeeper-web --branch=${{ | ||
inputs.environment }} | ||
|
||
- name: Summary | ||
run: | | ||
echo '### Successful WEB deployment 🚀🚀🚀' >> $GITHUB_STEP_SUMMARY | ||
echo 'Well done!' >> $GITHUB_STEP_SUMMARY | ||
echo 'Link to test environment:' >> $GITHUB_STEP_SUMMARY | ||
echo '${{ steps.deploy.outputs.deployment-url }}' >> $GITHUB_STEP_SUMMARY | ||
- name: Comment PR | ||
uses: thollander/actions-comment-pull-request@v3 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
message: | | ||
### Successful WEB deployment 🚀🚀🚀 | ||
Well done! | ||
Link to test environment: | ||
${{ steps.deploy.outputs.deployment-url }} | ||
comment-tag: web_deploy |
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
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
Oops, something went wrong.