Skip to content

feat(ui): add web version of numeric input #1347

feat(ui): add web version of numeric input

feat(ui): add web version of numeric input #1347

name: extension:integration-tests
env:
CI: true
DO_NOT_TRACK: 1
WALLET_ENVIRONMENT: testing
BITFLOW_API_HOST: ${{ secrets.BITFLOW_API_HOST }}
BITFLOW_API_KEY: ${{ secrets.BITFLOW_API_KEY }}
BITFLOW_READONLY_CALL_API_HOST: ${{ secrets.BITFLOW_READONLY_CALL_API_HOST }}
BITFLOW_READONLY_CALL_API_KEY: ${{ secrets.BITFLOW_READONLY_CALL_API_KEY }}
BITFLOW_KEEPER_API_KEY: ${{ secrets.BITFLOW_KEEPER_API_KEY }}
BITFLOW_KEEPER_API_HOST: ${{ secrets.BITFLOW_KEEPER_API_HOST }}
BITFLOW_PROVIDER_ADDRESS: ${{ secrets.BITFLOW_PROVIDER_ADDRESS }}
LAUNCH_DARKLY_KEY: ${{ secrets.EXTENSION_LAUNCH_DARKLY_KEY}}
on:
pull_request:
paths:
- 'apps/extension/**'
- 'packages/**'
- '!packages/ui/**/*.native.ts'
- '!packages/ui/**/*.native.tsx'
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
name: build-extension
runs-on: ubuntu-latest
defaults:
run:
working-directory: apps/extension
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/provision
- name: build-packages
working-directory: ./
run: pnpm turbo build [email protected]/extension^...
- name: build-styles
working-directory: apps/extension
run: pnpm run prepare:build
- name: build-extension-in-test-mode
run: pnpm build:test
- name: upload-extension-build-artifacts
uses: actions/upload-artifact@v4
with:
name: extension-dist
path: apps/extension/dist
retention-days: 1
if-no-files-found: error
test:
name: shard-${{ matrix.shardIndex }}-of-${{ matrix.shardTotal }}
needs: build
timeout-minutes: 30
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shardIndex: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
shardTotal: [10]
defaults:
run:
working-directory: apps/extension
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/provision
- name: download-extension-build-artifacts
uses: actions/download-artifact@v4
with:
name: extension-dist
path: apps/extension/dist
- name: build-styles
working-directory: apps/extension
run: pnpm run prepare:build
- name: build-test-dependencies
working-directory: ./
# We need to build these packages as the tests depend on them, listed manually for performance
run: pnpm turbo build [email protected]/{utils,models,bitcoin,stacks,rpc,query,constants}
- name: get-installed-playwright-version
id: playwright-version
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package.json').devDependencies['@playwright/test'])")" >> "$GITHUB_ENV"
- name: cache-playwright-binaries
uses: actions/cache@v4
id: playwright-cache
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-cache-1-${{ env.PLAYWRIGHT_VERSION }}
- name: install-playwright-browsers
run: pnpm playwright install chromium --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
- name: extract-branch-name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_OUTPUT"
id: extract_branch
# Playwright can only test extensions in headed mode, see
# https://playwright.dev/docs/chrome-extensions. To run a browser in
# headed mode, a display server is necessary. However, this job runs on
# an Ubuntu worker without a display server.
#
# The `xvfb-run` utility,
# https://manpages.ubuntu.com/manpages/xenial/man1/xvfb-run.1.html,
# provides a virtual X display server to the process it runs, allowing
# processes that require a display server to run in environments where
# one is not available.
- name: run-playwright-tests
run: xvfb-run pnpm playwright test tests/specs --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }} --workers=1
env:
BRANCH_NAME: ${{ steps.extract_branch.outputs.branch }}
EXTENSION_INTEGRATION_TEST_MNEMONIC: ${{ secrets.EXTENSION_INTEGRATION_TEST_MNEMONIC }}
- name: upload-blob-report-to-github-actions-artifacts
if: always()
uses: actions/upload-artifact@v4
with:
name: blob-report-${{ matrix.shardIndex }}
path: apps/extension/blob-report
retention-days: 1
if-no-files-found: error
merge-reports:
name: merge-reports
if: always()
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: download-blob-reports-from-github-actions-artifacts
uses: actions/download-artifact@v4
with:
path: all-blob-reports
pattern: blob-report-*
merge-multiple: true
- name: merge-into-html-report
run: npx playwright merge-reports --reporter html ./all-blob-reports
- name: extract-branch-name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_OUTPUT"
id: extract_branch
- uses: Wandalen/wretry.action@master
if: github.event_name == 'pull_request'
with:
action: peaceiris/actions-gh-pages@v4
with: |
personal_token: ${{ secrets.LEATHER_BOT }}
external_repository: leather-io/playwright-reports
publish_branch: main
publish_dir: ./playwright-report
destination_dir: extension/${{ steps.extract_branch.outputs.branch }}
- name: deploy-specs.leather.io
uses: peaceiris/actions-gh-pages@v4
if: steps.extract_branch.outputs.branch == 'dev'
with:
personal_token: ${{ secrets.LEATHER_BOT }}
external_repository: leather-io/specs.leather.io
publish_branch: main
publish_dir: ./playwright-report
cname: specs.leather.io